aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2020-08-16 20:15:55 +0200
committerMarvin Borner2020-08-16 20:15:55 +0200
commitd261bcea8955358ebe8e0c7e7a04a6ac883d85bd (patch)
tree7f37a96ac9d5b7cb92933cc807c52613161cd6cc /kernel/drivers
parent0dd3f5e6f4f7607611ce23510858ab3597b5df9f (diff)
Added scancode list and resolver
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/keyboard.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c
index 6405018..1cf103a 100644
--- a/kernel/drivers/keyboard.c
+++ b/kernel/drivers/keyboard.c
@@ -4,18 +4,19 @@
#include <def.h>
#include <event.h>
#include <interrupts.h>
+#include <print.h>
char keymap[128];
void keyboard_handler()
{
- u8 scan_code = inb(0x60);
+ u32 scancode = (u32)inb(0x60);
- if (scan_code > 128)
- return;
+ // TODO: Support multi-byte scancodes
+ /* printf("%x %x %x %x\n", scancode, inb(0x60), inb(0x60), inb(0x60)); */
- if ((scan_code & 0x80) == 0) { // PRESS
- event_trigger(EVENT_KEYBOARD, NULL);
+ if ((scancode & 0x80) == 0) { // PRESS
+ event_trigger(EVENT_KEYBOARD, (u32 *)scancode);
}
}