aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-04 05:39:16 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-04 05:39:16 +0100
commit52ce22ae22670b11c2bc5fac0583e1a4aa4e19f0 (patch)
tree67c6e6a02c567b45252074e2672bde6bc9ffde6f /include
parentf379b87b33282a7d583ce5e57be684a718f6a68d (diff)
Add option to only grab virtual devices, to support input remapping software
Diffstat (limited to 'include')
-rw-r--r--include/Config.hpp2
-rw-r--r--include/GlobalHotkeysLinux.hpp8
2 files changed, 8 insertions, 2 deletions
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<std::string, GlobalHotkeyCallback> bound_actions_by_id;
+ GrabType grab_type;
};
} \ No newline at end of file