blob: 686eaf86f91e27794be9f4ae3bb7441c71d65a43 (
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
32
33
|
#pragma once
#include <X11/X.h>
#include <X11/Xlib.h>
#include <map>
#include <string>
#include <X11/keysym.h>
#include <vector>
#include "commands.h"
#include "config.h"
#include "util.h"
struct Keybind {
KeySym key;
unsigned int modifiers;
std::string command;
};
class KeybindsModule {
public:
KeybindsModule(CommandsModule& commandsModule, Config& cfg, Globals& globals, void (*updateMousePos)());
~KeybindsModule() = default;
const void bind(const CommandArg* argv);
const void handleKeypress(XKeyEvent e);
const void clearKeybinds();
private:
std::vector<Keybind> binds;
CommandsModule& commandsModule;
Config& cfg;
Globals& globals;
void (*updateMousePos)();
};
|