aboutsummaryrefslogtreecommitdiff
path: root/include/GlobalHotkeys.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-11-24 18:25:58 +0100
committerdec05eba <dec05eba@protonmail.com>2024-11-24 18:33:57 +0100
commit734280f3042a1b2d08764599d1decdee2d4d3132 (patch)
tree4f72eb3aee2f8a98c05e4554f137f6e296fb2018 /include/GlobalHotkeys.hpp
parent56a7e558d290d168a906dba984f5051c1e327712 (diff)
Use linux /dev/input for global hotkeys instead of x11. This also works on wayland on any compositor
Diffstat (limited to 'include/GlobalHotkeys.hpp')
-rw-r--r--include/GlobalHotkeys.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/GlobalHotkeys.hpp b/include/GlobalHotkeys.hpp
index 020f5a5..662113e 100644
--- a/include/GlobalHotkeys.hpp
+++ b/include/GlobalHotkeys.hpp
@@ -19,9 +19,10 @@ namespace gsr {
GlobalHotkeys& operator=(const GlobalHotkeys&) = delete;
virtual ~GlobalHotkeys() = default;
- virtual bool bind_key_press(Hotkey hotkey, const std::string &id, GlobalHotkeyCallback callback) = 0;
- virtual void unbind_key_press(const std::string &id) = 0;
- virtual void unbind_all_keys() = 0;
+ virtual bool bind_key_press(Hotkey hotkey, const std::string &id, GlobalHotkeyCallback callback) { (void)hotkey; (void)id; (void)callback; return false; }
+ virtual void unbind_key_press(const std::string &id) { (void)id; }
+ virtual void unbind_all_keys() {}
+ virtual bool bind_action(const std::string &id, GlobalHotkeyCallback callback) { (void)id; (void)callback; return false; };
virtual void poll_events() = 0;
};
} \ No newline at end of file