From 33921e75c9d71ebfa8ac6d4838beafa8d7a7c604 Mon Sep 17 00:00:00 2001 From: 0GreenClover0 Date: Tue, 15 Aug 2023 23:22:30 +0200 Subject: [PATCH] Kernel: Stop overeagerly adding a Keypad modifier --- Kernel/Devices/HID/KeyboardDevice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp index 0e7fbb9a81..9b650c82da 100644 --- a/Kernel/Devices/HID/KeyboardDevice.cpp +++ b/Kernel/Devices/HID/KeyboardDevice.cpp @@ -244,6 +244,9 @@ void KeyboardDevice::handle_scan_code_input_event(ScanCodeEvent event) update_modifier(Mod_Shift, m_left_shift_pressed || m_right_shift_pressed); break; case 0x35: + if (event.e0_prefix) + update_modifier(Mod_Keypad, event.pressed); + break; case 0x37: case 0x47: case 0x48: @@ -259,7 +262,8 @@ void KeyboardDevice::handle_scan_code_input_event(ScanCodeEvent event) case 0x52: case 0x53: // FIXME: This should also include the keypad "enter" key, but that has the same scan code as the return key (0x1c). - update_modifier(Mod_Keypad, event.pressed); + if (!event.e0_prefix) + update_modifier(Mod_Keypad, event.pressed); break; }