1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

Kernel: Support PS/2 right super key

We currently support the left super key. This poses an issue on
keyboards that only have a right super key, such as my Steelseries 6G.

The implementation mirrors the left/right shift key logic and
effectively considers the right super key identical to the left one.
This commit is contained in:
Jelle Raaijmakers 2022-01-30 14:59:43 +01:00 committed by Andreas Kling
parent c20f1e06c0
commit 98d666eab3
2 changed files with 8 additions and 1 deletions

View file

@ -51,7 +51,12 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
update_modifier(Mod_Ctrl, pressed);
break;
case 0x5b:
update_modifier(Mod_Super, pressed);
m_left_super_pressed = pressed;
update_modifier(Mod_Super, m_left_super_pressed || m_right_super_pressed);
break;
case 0x5c:
m_right_super_pressed = pressed;
update_modifier(Mod_Super, m_left_super_pressed || m_right_super_pressed);
break;
case 0x2a:
m_left_shift_pressed = pressed;