From f9a4e9aecd2f38d0f82f24ac2dd4a1f9d4d84045 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 19 Mar 2022 17:48:18 +0100 Subject: basic keybinds --- src/managers/KeybindManager.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/managers/KeybindManager.hpp (limited to 'src/managers/KeybindManager.hpp') 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 +#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 m_dKeybinds; + + + // -------------- Dispatchers -------------- // + void killActive(std::string); + void spawn(std::string); + +}; + +inline std::unique_ptr g_pKeybindManager; \ No newline at end of file -- cgit v1.2.3