diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp index 67c355074e..d74d7feec9 100644 --- a/Kernel/Devices/HID/KeyboardDevice.cpp +++ b/Kernel/Devices/HID/KeyboardDevice.cpp @@ -43,6 +43,9 @@ void KeyboardDevice::handle_input_event(KeyEvent queued_event) } } + if (queued_event.map_entry_index != 0xFF) + queued_event.code_point = HIDManagement::the().get_char_from_character_map(queued_event, queued_event.map_entry_index); + // If using a non-QWERTY layout, queued_event.key needs to be updated to be the same as event.code_point KeyCode mapped_key = code_point_to_key_code(queued_event.code_point); if (mapped_key != KeyCode::Key_Invalid) @@ -58,9 +61,6 @@ void KeyboardDevice::handle_input_event(KeyEvent queued_event) update_modifier(Mod_Ctrl, m_caps_lock_to_ctrl_pressed); } - if (queued_event.map_entry_index != 0xFF) - queued_event.code_point = HIDManagement::the().get_char_from_character_map(queued_event, queued_event.map_entry_index); - { SpinlockLocker locker(HIDManagement::the().m_client_lock); if (HIDManagement::the().m_client)