aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
blob: a18aa4621d00157453e989a307cda9a8d0e6bd63 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
 * @file key.h
 * @author Joe Wingbermuehle
 * @date 2004-2006
 *
 * @brief Header for the key binding functions.
 *
 */

#ifndef KEY_H
#define KEY_H

struct ClientNode;

typedef enum {
	KEY_NONE         = 0,
	KEY_UP           = 1,
	KEY_DOWN         = 2,
	KEY_RIGHT        = 3,
	KEY_LEFT         = 4,
	KEY_ESC          = 5,
	KEY_ENTER        = 6,
	KEY_NEXT         = 7,
	KEY_NEXT_STACKED = 8,
	KEY_CLOSE        = 9,
	KEY_MIN          = 10,
	KEY_MAX          = 11,
	KEY_SHADE        = 12,
	KEY_MOVE         = 13,
	KEY_RESIZE       = 14,
	KEY_ROOT         = 15,
	KEY_WIN          = 16,
	KEY_DESKTOP      = 17,
	KEY_EXEC         = 18,
	KEY_RESTART      = 19,
	KEY_EXIT         = 20
} KeyType;

void InitializeKeys();
void StartupKeys();
void ShutdownKeys();
void DestroyKeys();

KeyType GetKey(const XKeyEvent *event);
void GrabKeys(struct ClientNode *np);

void InsertBinding(KeyType key, const char *modifiers,
	const char *stroke, const char *code, const char *command);

void RunKeyCommand(const XKeyEvent *event);

void ShowKeyMenu(const XKeyEvent *event);

void ValidateKeys();

#endif