diff options
author | Benji Dial <benji6283@gmail.com> | 2021-03-01 22:35:26 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-03-01 22:35:26 -0500 |
commit | 1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7 (patch) | |
tree | a49a5498080551270a827a205cde49477d4d89ff /src/kernel/kbd.c | |
parent | 6f1b50a4cc6c232ee505a543f006abb1c6cd33cf (diff) | |
download | portland-os-1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7.tar.gz |
minimal file writing, shutdown keybinding (Win+Shift+Q)
Diffstat (limited to 'src/kernel/kbd.c')
-rw-r--r-- | src/kernel/kbd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/kbd.c b/src/kernel/kbd.c index 96d2069..47894cd 100644 --- a/src/kernel/kbd.c +++ b/src/kernel/kbd.c @@ -1,6 +1,7 @@ #include <stdint.h> #include "settings.h" +#include "shutdown.h" #include "window.h" #include "drive.h" #include "panic.h" @@ -221,6 +222,9 @@ enum kbd_isr_result on_kbd_isr() { if (!is_up && (entry == KEY_PAUSE) && (keymods & ALTS)) return (keymods & SHIFTS) ? SHIFT_DUMP : DUMP; + if (!is_up && (entry == KEY_Q) && (keymods & WINS) && (keymods & SHIFTS)) + shutdown(); + on_action((struct window_action){ .action_type = is_up ? KEY_UP : KEY_DOWN, .as_key = (struct key_packet){ |