From 22806333355f52ea931ce6135b7bde80a382dfe2 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 20 Feb 2020 13:20:54 -0500 Subject: [PATCH] PS/2: Handle PrntScrn as well as SysReq for emergency keys. Usually these are the same physical key, but some keyboards (like my laptop) do not have a SysReq key, only a PrntScrn key. Fixes entering KDL via the shortcut on my laptop. --- src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp b/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp index b41fdea02e..56c6081bd2 100644 --- a/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp +++ b/src/add-ons/kernel/bus_managers/ps2/ps2_keyboard.cpp @@ -41,7 +41,8 @@ enum { LEFT_ALT_KEY = 0x38, RIGHT_ALT_KEY = 0xb8, - SYS_REQ_KEY = 0x54 + SYS_REQ_KEY = 0x54, + PRNT_SCRN_KEY = 0x80 | 0x37, }; @@ -163,7 +164,7 @@ keyboard_handle_int(ps2_dev *dev) emergencyKeyStatus &= ~(scancode == LEFT_ALT_KEY ? EMERGENCY_LEFT_ALT : EMERGENCY_RIGHT_ALT); } - } else if (scancode == SYS_REQ_KEY) { + } else if (scancode == SYS_REQ_KEY || scancode == PRNT_SCRN_KEY_DOWN) { if (keyInfo.is_keydown) emergencyKeyStatus |= EMERGENCY_SYS_REQ; else