-
Notifications
You must be signed in to change notification settings - Fork 0
/
getkey.h
77 lines (75 loc) · 2.13 KB
/
getkey.h
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <stdio.h>
int getkey(int in);
#define KEY_F1 ('A'-0x400)
#define KEY_F1_ALT (11-0x600)
#define KEY_F2 ('B'-0x400)
#define KEY_F2_ALT (12-0x600)
#define KEY_F3 ('C'-0x400)
#define KEY_F3_ALT (13-0x600)
#define KEY_F4 ('D'-0x400)
#define KEY_F4_ALT (14-0x600)
#define KEY_F5 ('E'-0x400)
#define KEY_F5_ALT (15-0x600)
#define KEY_F6 (16-0x600)
#define KEY_F7 (17-0x600)
#define KEY_F8 (18-0x600)
#define KEY_F9 (19-0x600)
#define KEY_F10 (20-0x600)
#define KEY_F11 (21-0x600)
#define KEY_F12 (22-0x600)
#define KEY_F13 (23-0x600)
#define KEY_F14 (24-0x600)
#define KEY_F15 (25-0x600)
#define KEY_F16 (26-0x600)
#define KEY_F17 (27-0x600)
#define KEY_F18 (28-0x600)
#define KEY_F19 (29-0x600)
#define KEY_F20 (30-0x600)
#define KEY_F21 (31-0x600)
#define KEY_F22 (32-0x600)
#define KEY_F23 (33-0x600)
#define KEY_F24 (34-0x600)
#define KEY_UP ('A'-0x500)
#define KEY_UP_ALT ('A'-0x300)
#define KEY_DOWN ('B'-0x500)
#define KEY_DOWN_ALT ('B'-0x300)
#define KEY_RIGHT ('C'-0x500)
#define KEY_RIGHT_ALT ('C'-0x300)
#define KEY_LEFT ('D'-0x500)
#define KEY_LEFT_ALT ('D'-0x300)
#define KEY_MID ('G'-0x500)
#define KEY_PAUSE ('P'-0x500)
#define KEY_HOME_ALT ('H'-0x200)
#define KEY_HOME (1-0x600)
#define KEY_INS (2-0x600)
#define KEY_DEL (3-0x600)
#define KEY_END (4-0x600)
#define KEY_PGUP (5-0x600)
#define KEY_PGUP_ALT (55-0x600)
#define KEY_PGDN (6-0x600)
#define KEY_PGDN_ALT (66-0x600)
#define KEY_KPAD_ENTER ('M'-0x200)
#define KEY_KPAD_NUMLOCK ('P'-0x200)
#define KEY_KPAD_DIV ('Q'-0x200)
#define KEY_KPAD_MULT ('R'-0x200)
#define KEY_KPAD_MINUS ('S'-0x200)
#define KEY_KPAD_PLUS ('k'-0x200)
#define KEY_KPAD_PLUS_ALT ('l'-0x200)
#define KEY_KPAD_DOT ('n'-0x200)
#define KEY_KPAD_MINUS_ALT ('o'-0x200)
#define KEY_KPAD0 ('p'-0x200)
#define KEY_KPAD1 ('q'-0x200)
#define KEY_KPAD2 ('r'-0x200)
#define KEY_KPAD3 ('s'-0x200)
#define KEY_KPAD4 ('t'-0x200)
#define KEY_KPAD5 ('u'-0x200)
#define KEY_KPAD6 ('v'-0x200)
#define KEY_KPAD7 ('w'-0x200)
#define KEY_KPAD8 ('x'-0x200)
#define KEY_KPAD9 ('y'-0x200)
#define KEY_BACKSPACE 127
#define KEY_TAB 9
#define KEY_ENTER 13
#define KEY_ESC 27
#define KEYALT (-0x100)
#define KEYCTRL (-64)