diff options
author | Marvin Borner | 2020-08-16 20:15:55 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-16 20:15:55 +0200 |
commit | d261bcea8955358ebe8e0c7e7a04a6ac883d85bd (patch) | |
tree | 7f37a96ac9d5b7cb92933cc807c52613161cd6cc /kernel/drivers | |
parent | 0dd3f5e6f4f7607611ce23510858ab3597b5df9f (diff) |
Added scancode list and resolver
Diffstat (limited to 'kernel/drivers')
-rw-r--r-- | kernel/drivers/keyboard.c | 11 |
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); } } |