From be023cf57d763ff5b17dbb2a3afec156ca54a65d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 31 Oct 2019 23:14:05 +0100 Subject: Fixed several warnings --- src/kernel/input/ps2/keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/input/ps2') diff --git a/src/kernel/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c index 87006b6..7e01af5 100644 --- a/src/kernel/input/ps2/keyboard.c +++ b/src/kernel/input/ps2/keyboard.c @@ -71,7 +71,7 @@ void keyboard_handler(struct regs *r) { scan_code = receive_b(0x60); - if (!(scan_code & 0x80)) { // PRESS + if ((scan_code & 0x80) == 0) { // PRESS // TODO: Fix caps lock deactivation when pressing shift while shifted if (current_keymap[scan_code] == 14 || (current_keymap[scan_code] == 15 && !shift_pressed)) { shift_pressed = 1; @@ -81,7 +81,7 @@ void keyboard_handler(struct regs *r) { return; } vesa_keyboard_char(current_keymap[scan_code]); - } else if (scan_code & 0x80) { // RELEASE + } else { // RELEASE char key = current_keymap[scan_code]; if (key == 14) shift_pressed = 0; } -- cgit v1.2.3