Kernel: Stop overeagerly adding a Keypad modifier

This commit is contained in:
0GreenClover0 2023-08-15 23:22:30 +02:00 committed by Andrew Kaster
parent abf0c8f1a6
commit 33921e75c9

View file

@ -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); update_modifier(Mod_Shift, m_left_shift_pressed || m_right_shift_pressed);
break; break;
case 0x35: case 0x35:
if (event.e0_prefix)
update_modifier(Mod_Keypad, event.pressed);
break;
case 0x37: case 0x37:
case 0x47: case 0x47:
case 0x48: case 0x48:
@ -259,6 +262,7 @@ void KeyboardDevice::handle_scan_code_input_event(ScanCodeEvent event)
case 0x52: case 0x52:
case 0x53: case 0x53:
// FIXME: This should also include the keypad "enter" key, but that has the same scan code as the return key (0x1c). // FIXME: This should also include the keypad "enter" key, but that has the same scan code as the return key (0x1c).
if (!event.e0_prefix)
update_modifier(Mod_Keypad, event.pressed); update_modifier(Mod_Keypad, event.pressed);
break; break;
} }