summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorAleksa Vučković <aleksav013@gmail.com>2021-10-11 11:35:59 +0200
committerAleksa Vučković <aleksav013@gmail.com>2021-10-11 11:35:59 +0200
commit578d467b80015c52d0c96c8443b4c13936f33365 (patch)
tree05525782bc3baf5a01d8b657f01934e1e598a775 /src/keyboard.h
parent3a9ccbd8e762477f75d8b164a1d99383a01414ae (diff)
(IDT + keyboard) finally working
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
new file mode 100644
index 0000000..53846e6
--- /dev/null
+++ b/src/keyboard.h
@@ -0,0 +1,74 @@
+unsigned char keyboard[128] = {
+ // -------- 0 to 9 --------
+ ' ',
+ ' ', // escape key
+ '1','2','3','4','5','6','7','8',
+ // -------- 10 to 19 --------
+ '9','0','-','=',
+ ' ', // Backspace
+ ' ', // Tab
+ 'q','w','e','r',
+ // -------- 20 to 29 --------
+ 't','y','u','i','o','p','[',']',
+ '\n', // Enter
+ ' ', // left Ctrl
+ // -------- 30 to 39 --------
+ 'a','s','d','f','g','h','j','k','l',';',
+ // -------- 40 to 49 --------
+ ' ','`',
+ ' ', // left Shift
+ ' ','z','x','c','v','b','n',
+ // -------- 50 to 59 --------
+ 'm',',','.',
+ '/', // slash, or numpad slash if preceded by keycode 224
+ ' ', // right Shift
+ '*', // numpad asterisk
+ ' ', // left Alt
+ ' ', // Spacebar
+ ' ',
+ ' ', // F1
+ // -------- 60 to 69 --------
+ ' ', // F2
+ ' ', // F3
+ ' ', // F4
+ ' ', // F5
+ ' ', // F6
+ ' ', // F7
+ ' ', // F8
+ ' ', // F9
+ ' ', // F10
+ ' ',
+ // -------- 70 to 79 --------
+ ' ', // scroll lock
+ '7', // numpad 7, HOME key if preceded by keycode 224
+ '8', // numpad 8, up arrow if preceded by keycode 224
+ '9', // numpad 9, PAGE UP key if preceded by keycode 224
+ '-', // numpad hyphen
+ '4', // numpad 4, left arrow if preceded by keycode 224
+ '5', // numpad 5
+ '6', // numpad 6, right arrow if preceded by keycode 224
+ ' ',
+ '1', // numpad 1, END key if preceded by keycode 224
+ // -------- 80 to 89 --------
+ '2', // numpad 2, down arrow if preceded by keycode 224
+ '3', // numpad 3, PAGE DOWN key if preceded by keycode 224
+ '0', // numpad 0, INSERT key if preceded by keycode 224
+ '.', // numpad dot, DELETE key if preceded by keycode 224
+ ' ',' ',' ',' ',' ',' ',
+ // -------- 90 to 99 --------
+ ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+ // -------- 100 to 109 --------
+ ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+ // -------- 110 to 119 --------
+ ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+ // -------- 120-127 --------
+ ' ',' ',' ',' ',' ',' ',' ',' ',
+};
+// Right control, right alt seem to send
+// keycode 224, then the left control/alt keycode
+// Arrow keys also send two interrupts, one 224 and then their actual code
+// Same for numpad enter
+// 197: Num Lock
+// 157: Pause|Break (followed by 197?)
+// Clicking on screen appears to send keycodes 70, 198
+ // Is this the MARK command or something like that?