aboutsummaryrefslogtreecommitdiff
path: root/include/GlobalHotkeysLinux.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-23 21:23:19 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-23 21:25:45 +0100
commit1d9d4d6398e989d0628cb4dab0273293b79b4816 (patch)
treed5c4bd8c6f27d84156177831f1c0e6beb0de762a /include/GlobalHotkeysLinux.hpp
parent47ada4d79844d9a98d9689d0de0c92864e0fc372 (diff)
Make hotkeys reconfigurable, faster hotkey startup time, fix some keyboard locale issues
Diffstat (limited to 'include/GlobalHotkeysLinux.hpp')
-rw-r--r--include/GlobalHotkeysLinux.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/GlobalHotkeysLinux.hpp b/include/GlobalHotkeysLinux.hpp
index addb849..c9428de 100644
--- a/include/GlobalHotkeysLinux.hpp
+++ b/include/GlobalHotkeysLinux.hpp
@@ -18,11 +18,13 @@ namespace gsr {
~GlobalHotkeysLinux() override;
bool start();
- bool bind_action(const std::string &id, GlobalHotkeyCallback callback) override;
+ bool bind_key_press(Hotkey hotkey, const std::string &id, GlobalHotkeyCallback callback) override;
+ void unbind_all_keys() override;
void poll_events() override;
private:
pid_t process_id = 0;
- int pipes[2];
+ int read_pipes[2];
+ int write_pipes[2];
FILE *read_file = nullptr;
std::unordered_map<std::string, GlobalHotkeyCallback> bound_actions_by_id;
GrabType grab_type;