diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-23 21:23:19 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-23 21:25:45 +0100 |
commit | 1d9d4d6398e989d0628cb4dab0273293b79b4816 (patch) | |
tree | d5c4bd8c6f27d84156177831f1c0e6beb0de762a /include/GlobalHotkeysLinux.hpp | |
parent | 47ada4d79844d9a98d9689d0de0c92864e0fc372 (diff) |
Make hotkeys reconfigurable, faster hotkey startup time, fix some keyboard locale issues
Diffstat (limited to 'include/GlobalHotkeysLinux.hpp')
-rw-r--r-- | include/GlobalHotkeysLinux.hpp | 6 |
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; |