File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 21
21
#define KEYBOARD_RESEND 0xFE
22
22
#define KEYBOARD_RESET 0xFF
23
23
24
+ /* Key codes for non-printable characters */
25
+ #define KEY_F9 0x01
26
+ #define KEY_F5 0x03
27
+ #define KEY_F3 0x04
28
+ #define KEY_F1 0x05
29
+ #define KEY_F2 0x06
30
+ #define KEY_F12 0x07
31
+ #define KEY_F10 0x09
32
+ #define KEY_F8 0x0A
33
+ #define KEY_F6 0x0B
34
+ #define KEY_F4 0x0C
35
+ #define KEY_TAB 0x0D
36
+ #define KEY_LEFT_ALT 0x11
37
+ #define KEY_LEFT_SHIFT 0x12
38
+ #define KEY_LEFT_CTRL 0x14
39
+ #define KEY_CAPS_LOCK 0x58
40
+ #define KEY_RIGHT_SHIFT 0x59
41
+ #define KEY_BACKSPACE 0x66
42
+ #define KEY_ESC 0x76
43
+ #define KEY_NUM_LOCK 0x77
44
+ #define KEY_F11 0x78
45
+ #define KEY_SCROLL_LOCK 0x7E
46
+ #define KEY_F7 0x83
47
+
24
48
#define KEYBOARD_QUEUE_SIZE 16
25
49
26
50
/* Put a character in the keyboard code queue*/
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ void kernel_main(void) {
71
71
/* key code is a press of a key that can be typed on screen */
72
72
73
73
/* backspace */
74
- if (b == 0x66 ) {
74
+ if (b == KEY_BACKSPACE ) {
75
75
terminal_backspace ();
76
76
} else {
77
77
/* not backspace */
You can’t perform that action at this time.
0 commit comments