swissChili | 19ef418 | 2021-02-21 17:45:51 -0800 | [diff] [blame] | 1 | #pragma once |
2 | |||||
3 | #include "kint.h" | ||||
4 | |||||
5 | struct kbd_scan_codes | ||||
6 | { | ||||
7 | bool ascii; | ||||
8 | int symbol; | ||||
9 | int up_symbol; | ||||
10 | uchar prefix; | ||||
11 | bool brk; | ||||
12 | }; | ||||
13 | |||||
14 | enum kbd_keys | ||||
15 | { | ||||
16 | FIRST_KBD_KEY = 129, | ||||
17 | KBD_BACKSPACE = 129, | ||||
18 | KBD_TAB, | ||||
19 | KBD_CAPS_LOCK, | ||||
20 | KBD_ENTER, | ||||
21 | KBD_LEFT_SHIFT, | ||||
22 | KBD_RIGHT_SHIFT, | ||||
23 | KBD_LEFT_CTRL, | ||||
24 | KBD_LEFT_ALT, | ||||
25 | KBD_SPACEBAR, | ||||
26 | KBD_RIGHT_ALT, | ||||
27 | KBD_RIGHT_CTRL, | ||||
28 | KBD_INSERT, | ||||
29 | KBD_DELETE, | ||||
30 | KBD_LEFT_ARROW, | ||||
31 | KBD_HOME, | ||||
32 | KBD_END, | ||||
33 | KBD_UP_ARROW, | ||||
34 | KBD_DOWN_ARROW, | ||||
35 | KBD_RIGHT_ARROW, | ||||
36 | KBD_NUM_LOCK, | ||||
37 | KBD_KEYPAD_0, | ||||
38 | KBD_KEYPAD_1, | ||||
39 | KBD_KEYPAD_2, | ||||
40 | KBD_KEYPAD_3, | ||||
41 | KBD_KEYPAD_4, | ||||
42 | KBD_KEYPAD_5, | ||||
43 | KBD_KEYPAD_6, | ||||
44 | KBD_KEYPAD_7, | ||||
45 | KBD_KEYPAD_8, | ||||
46 | KBD_KEYPAD_9, | ||||
47 | KBD_KEYPAD_DOT, | ||||
48 | KBD_KEYPAD_PLUS, | ||||
49 | KBD_KEYPAD_MINUS, | ||||
50 | KBD_KEYPAD_TIMES, | ||||
51 | KBD_KEYPAD_DIV, | ||||
52 | KBD_KEYPAD_ENTER, | ||||
53 | KBD_ESC, | ||||
54 | KBD_F1, | ||||
55 | KBD_F2, | ||||
56 | KBD_F3, | ||||
57 | KBD_F4, | ||||
58 | KBD_F5, | ||||
59 | KBD_F6, | ||||
60 | KBD_F7, | ||||
61 | KBD_F8, | ||||
62 | KBD_F9, | ||||
63 | KBD_F10, | ||||
64 | KBD_F11, | ||||
65 | KBD_F12, | ||||
66 | KBD_PRINT_SCREEN, | ||||
67 | KBD_SCROLL_LOCK, | ||||
68 | KBD_PAUSE_BREAK, | ||||
69 | KBD_PAGE_UP, | ||||
70 | KBD_PAGE_DOWN, | ||||
71 | LAST_KBD_KEY, | ||||
72 | }; | ||||
73 | |||||
74 | extern const struct kbd_scan_codes scan_code_set_3[0xff]; | ||||
75 | extern const struct kbd_scan_codes scan_code_set_1[0xff]; | ||||
76 | extern bool pressed_keys[LAST_KBD_KEY]; | ||||
77 | extern char special_key_mappings[LAST_KBD_KEY - FIRST_KBD_KEY]; |