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/Config.hpp | 2 +- include/GlobalHotkeysLinux.hpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Config.hpp b/include/Config.hpp index dcfdee1..6f81c1c 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -43,7 +43,7 @@ namespace gsr { struct MainConfig { int32_t config_file_version = 0; bool software_encoding_warning_shown = false; - bool enable_hotkeys = true; + std::string hotkeys_enable_option = "enable_hotkeys"; std::string tint_color; }; 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