diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-19 17:48:18 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-19 17:48:18 +0100 |
| commit | f9a4e9aecd2f38d0f82f24ac2dd4a1f9d4d84045 (patch) | |
| tree | bfc784c918da55993f7635172aa7ce83348fa5f8 /src/managers/KeybindManager.hpp | |
| parent | dba7bbdcf35a123e6106b420d9cc6064528080e0 (diff) | |
basic keybinds
Diffstat (limited to 'src/managers/KeybindManager.hpp')
| -rw-r--r-- | src/managers/KeybindManager.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp new file mode 100644 index 00000000..927b9b44 --- /dev/null +++ b/src/managers/KeybindManager.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "../defines.hpp" +#include <deque> +#include "../Compositor.hpp" + +struct SKeybind { + std::string key = 0; + uint32_t modmask = 0; + std::string handler = ""; + std::string arg = ""; +}; + +class CKeybindManager { +public: + void handleKeybinds(const uint32_t&, const xkb_keysym_t&); + void addKeybind(SKeybind); + uint32_t stringToModMask(std::string); + +private: + std::deque<SKeybind> m_dKeybinds; + + + // -------------- Dispatchers -------------- // + void killActive(std::string); + void spawn(std::string); + +}; + +inline std::unique_ptr<CKeybindManager> g_pKeybindManager;
\ No newline at end of file |
