summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-19 17:48:18 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-19 17:48:18 +0100
commitf9a4e9aecd2f38d0f82f24ac2dd4a1f9d4d84045 (patch)
treebfc784c918da55993f7635172aa7ce83348fa5f8 /src/managers/KeybindManager.hpp
parentdba7bbdcf35a123e6106b420d9cc6064528080e0 (diff)
basic keybinds
Diffstat (limited to 'src/managers/KeybindManager.hpp')
-rw-r--r--src/managers/KeybindManager.hpp30
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