diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-05-03 12:03:43 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-05-03 12:03:43 +0200 |
commit | d08ea692771caa8e385412c2f992089672773e30 (patch) | |
tree | 994c05673d90b130e25d8bc25c6c365f607134db /include/GlobalHotkeysLinux.hpp | |
parent | 180a3b73dbab2f586c53f9e5f044ab88aca95014 (diff) |
Keep keyboard led when turning on global hotkeys, move files
Diffstat (limited to 'include/GlobalHotkeysLinux.hpp')
-rw-r--r-- | include/GlobalHotkeysLinux.hpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/GlobalHotkeysLinux.hpp b/include/GlobalHotkeysLinux.hpp deleted file mode 100644 index 959d095..0000000 --- a/include/GlobalHotkeysLinux.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "GlobalHotkeys.hpp" -#include <unordered_map> -#include <sys/types.h> - -namespace gsr { - class GlobalHotkeysLinux : public GlobalHotkeys { - public: - enum class GrabType { - ALL, - VIRTUAL - }; - - GlobalHotkeysLinux(GrabType grab_type); - GlobalHotkeysLinux(const GlobalHotkeysLinux&) = delete; - GlobalHotkeysLinux& operator=(const GlobalHotkeysLinux&) = delete; - ~GlobalHotkeysLinux() override; - - bool start(); - bool bind_key_press(Hotkey hotkey, const std::string &id, GlobalHotkeyCallback callback) override; - void unbind_all_keys() override; - void poll_events() override; - private: - void close_fds(); - private: - pid_t process_id = 0; - 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; - }; -}
\ No newline at end of file |