X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/80890b99fec2630ef0a1a0805d894c3d86c16506..a0655e5d30f3cdc73b1aaaa4825d8fae9f92ce4a:/lunaix-os/kernel/k_main.c diff --git a/lunaix-os/kernel/k_main.c b/lunaix-os/kernel/k_main.c index b3b1103..c3819d9 100644 --- a/lunaix-os/kernel/k_main.c +++ b/lunaix-os/kernel/k_main.c @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include extern uint8_t __kernel_start; @@ -51,7 +53,19 @@ _kernel_main() lxfree(arr); lxfree(big_); - timer_run_second(1, test_timer, NULL, TIMER_MODE_PERIODIC); + // timer_run_second(1, test_timer, NULL, TIMER_MODE_PERIODIC); + + struct kdb_keyinfo_pkt keyevent; + while (1) + { + if (!kbd_recv_key(&keyevent)) { + continue; + } + if ((keyevent.state & KBD_KEY_FPRESSED) && (keyevent.keycode & 0xff00) <= KEYPAD) { + tty_put_char((char)(keyevent.keycode & 0x00ff)); + tty_sync_cursor(); + } + } spin(); }