summaryrefslogtreecommitdiff
path: root/kernel/src/devices
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/devices')
-rw-r--r--kernel/src/devices/keyboard.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/src/devices/keyboard.c b/kernel/src/devices/keyboard.c
index bf4948d..d4b06b9 100644
--- a/kernel/src/devices/keyboard.c
+++ b/kernel/src/devices/keyboard.c
@@ -39,6 +39,12 @@ void itos(uint32_t num, char** s)
void print_char(char c)
{
+
+ if (c == '\n') {
+ x = 0;
+ y++;
+ return;
+ }
if (x * 8 >= fb.width) {
x = 0;
y++;
@@ -76,8 +82,7 @@ void keyboard_handler(void)
print_char(' ');
x--;
} else if (keycode == KEY_ENTER) {
- x = 0;
- y++;
+ print_char(keymap[keycode]);
} else {
if (keymap[keycode] == ' ') return;
if (is_pressed[KEY_LSHIFT] || is_pressed[KEY_RSHIFT])