summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 30dc5b7..f3919ac 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -61,15 +61,16 @@ void keyup(char c) {
}
-void process_scancode(uint8_t c) {
+void keyboard_event(uint8_t (*get_bytes)()) {
+ uint8_t data = get_bytes();
uint8_t code;
int release;
- if (c > 0x80 && c <= 0xD8) {
+ if (data > 0x80 && data <= 0xD8) {
release = 1;
- code = c - 0x80;
+ code = data - 0x80;
} else {
release = 0;
- code = c;
+ code = data;
}
switch (code) {
default: