feature: add a few helpers fn (is...)

fix: print unprintable characters no longer occurs
This commit is contained in:
2024-10-11 13:10:47 +02:00
parent 29b59c474d
commit 41786ea523
7 changed files with 45 additions and 15 deletions

View File

@ -29,5 +29,8 @@ void kernel_main(void)
init_idt();
init_memory();
load_drivers();
kprintf("I see no way to confuse an array of 256 seg:off pairs with a "
"complex 8*unknown quantity -byte descriptor table. -- Troy "
"Martin 03:50, 22 March 2009 (UTC)\n");
shell_init();
}

View File

@ -2,7 +2,7 @@
#include "alloc.h"
#include "commands.h"
#include "drivers.h"
#include "ctype.h"
#include "kprintf.h"
#include "shell.h"
#include "string.h"

View File

@ -20,7 +20,8 @@ struct key_event terminal_getkey(void)
scan_code == KEY_LEFT_SHIFT + 128)
caps_mode = false;
if (scan_code < 128) {
ev.c = keymap[scan_code][caps_mode];
if (keymap[scan_code])
ev.c = keymap[scan_code][caps_mode];
if (scan_code >= KEY_F1 && scan_code <= KEY_F10)
terminal_set_screen(scan_code - KEY_F1);
ev.scan_code = scan_code;