diff options
author | Benji Dial <benji6283@gmail.com> | 2021-02-16 20:38:53 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-02-16 20:38:53 -0500 |
commit | 47513bd32c256c4f35e3a8ced7d9fd7e15903530 (patch) | |
tree | cafdf75d52a954814726e07445063c41bb6599f9 /src/kernel/kbd.c | |
parent | bd7facc4b5f53481dc85a15ba123361b2758655b (diff) | |
download | portland-os-47513bd32c256c4f35e3a8ced7d9fd7e15903530.tar.gz |
terminal application with ipc, shift+pause state dumper, hello world for terminal, meminfo popup program
Diffstat (limited to 'src/kernel/kbd.c')
-rw-r--r-- | src/kernel/kbd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/kbd.c b/src/kernel/kbd.c index f7158bb..c09684d 100644 --- a/src/kernel/kbd.c +++ b/src/kernel/kbd.c @@ -91,7 +91,7 @@ static inline uint8_t get_next_code_byte() { static enum key_modifiers_t keymods = 0; -void on_kbd_isr() { +enum kbd_isr_result on_kbd_isr() { //logf(LOG_INFO, "on_kbd_isr()"); while (inb(PS2_CMD) & PS2S_CODE_READY) { last_code_byte = 0; @@ -201,6 +201,9 @@ void on_kbd_isr() { break; } + if (!is_up && (entry == KEY_PAUSE) && (keymods & ALTS)) + return (keymods & SHIFTS) ? SHIFT_DUMP : DUMP; + on_action((struct window_action){ .action_type = is_up ? KEY_UP : KEY_DOWN, .as_key = (struct key_packet){ @@ -209,4 +212,5 @@ void on_kbd_isr() { } }); } + return NORMAL; } |