From 52ce22ae22670b11c2bc5fac0583e1a4aa4e19f0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 4 Jan 2025 05:39:16 +0100 Subject: Add option to only grab virtual devices, to support input remapping software --- include/GlobalHotkeysLinux.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/GlobalHotkeysLinux.hpp') diff --git a/include/GlobalHotkeysLinux.hpp b/include/GlobalHotkeysLinux.hpp index 62da74e..addb849 100644 --- a/include/GlobalHotkeysLinux.hpp +++ b/include/GlobalHotkeysLinux.hpp @@ -7,7 +7,12 @@ namespace gsr { class GlobalHotkeysLinux : public GlobalHotkeys { public: - GlobalHotkeysLinux(); + enum class GrabType { + ALL, + VIRTUAL + }; + + GlobalHotkeysLinux(GrabType grab_type); GlobalHotkeysLinux(const GlobalHotkeysLinux&) = delete; GlobalHotkeysLinux& operator=(const GlobalHotkeysLinux&) = delete; ~GlobalHotkeysLinux() override; @@ -20,5 +25,6 @@ namespace gsr { int pipes[2]; FILE *read_file = nullptr; std::unordered_map bound_actions_by_id; + GrabType grab_type; }; } \ No newline at end of file -- cgit v1.2.3