From 1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 1 Mar 2021 22:35:26 -0500 Subject: minimal file writing, shutdown keybinding (Win+Shift+Q) --- src/kernel/kbd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/kernel/kbd.c') 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 #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){ -- cgit v1.2.3