lesson 20 finished: timer + keyboard

This commit is contained in:
Carlos
2015-03-20 16:42:19 +01:00
parent 46094a0e96
commit 5aaabf189d
4 changed files with 11 additions and 5 deletions

View File

@@ -197,11 +197,14 @@ void print_letter(u8 scancode) {
break;
default:
/* 'keuyp' event corresponds to the 'keydown' + 0x80
* it may still be a scancode we haven't implemented yet */
if (scancode - 0x80 <= 0x39) {
* it may still be a scancode we haven't implemented yet, or
* maybe a control/escape sequence */
if (scancode <= 0x7f) {
kprint("Unknown key down");
} else if (scancode <= 0x39 + 0x80) {
kprint("key up ");
print_letter(scancode - 0x80);
} else kprint("Unknown");
} else kprint("Unknown key up");
break;
}
}