basic keybinds
This commit is contained in:
parent
dba7bbdcf3
commit
f9a4e9aecd
7 changed files with 139 additions and 3 deletions
30
src/managers/KeybindManager.hpp
Normal file
30
src/managers/KeybindManager.hpp
Normal file
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue