aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/input')
-rw-r--r--src/kernel/input/ps2/keyboard.c4
-rw-r--r--src/kernel/input/ps2/mouse.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/kernel/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c
index bafecd5..4cbbf04 100644
--- a/src/kernel/input/ps2/keyboard.c
+++ b/src/kernel/input/ps2/keyboard.c
@@ -4,8 +4,6 @@
#include <kernel/input/input.h>
#include <kernel/lib/stdlib/liballoc.h>
#include <kernel/lib/string.h>
-#include <kernel/paging/paging.h>
-#include <kernel/lib/lib.h>
int shift_pressed;
int control_pressed;
@@ -109,7 +107,7 @@ void keyboard_handler(struct regs *r)
keyboard_char_buffer = current_keymap[scan_code];
keyboard_buffer[strlen(keyboard_buffer)] = keyboard_char_buffer;
} else { // RELEASE
- if (current_keymap[scan_code] == -107) // TODO: IDK WHY -107?!
+ if (current_keymap[scan_code] == (int) 0xffffffb5) // TODO: IDK WHY -107?!
control_pressed = 0;
}
}
diff --git a/src/kernel/input/ps2/mouse.c b/src/kernel/input/ps2/mouse.c
index 75d80a1..8b36ef9 100644
--- a/src/kernel/input/ps2/mouse.c
+++ b/src/kernel/input/ps2/mouse.c
@@ -1,6 +1,7 @@
#include <kernel/interrupts/interrupts.h>
#include <kernel/io/io.h>
#include <kernel/graphics/vesa.h>
+#include <kernel/lib/stdio.h>
char mouse_cycle = 0;
char mouse_byte[3];
@@ -109,7 +110,7 @@ void mouse_install()
mouse_write(0xF2);
mouse_read();
status = mouse_read();
- if (status == 3) serial_write("Scrollwheel support!\n");
+ if (status == 3) serial_printf("Scrollwheel support!");
// Activate 4th and 5th mouse buttons
mouse_write(0xF2);
@@ -130,7 +131,7 @@ void mouse_install()
mouse_write(0xF2);
mouse_read();
status = mouse_read();
- if (status == 4) serial_write("4th and 5th mouse button support!\n");
+ if (status == 4) serial_printf("4th and 5th mouse button support!");
/* TODO: Fix mouse laggyness
mouse_write(0xE8);