blob: c0cc9551b6e9fe92f29d06e720af68f88b772d6d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include <X11/X.h>
#include <X11/Xlib.h>
#include <map>
#include <string>
#include <X11/keysym.h>
#include <vector>
#include "commands.h"
struct Keybind {
KeyCode key;
unsigned int modifiers;
std::string command;
};
class KeybindsModule {
public:
KeybindsModule(CommandsModule& commandsModule, Display* dpy, Window root);
~KeybindsModule() = default;
const void bind(const CommandArg* argv);
const void exit(const CommandArg* argv);
const void handleKeypress(XKeyEvent e);
private:
std::vector<Keybind> binds;
bool exitNow;
CommandsModule& commandsModule;
Display* dpy;
Window root;
};
|