X11 keycodes are just Linux keycodes + 8 nowadays according to evdev or libinput drivers, and we can avoid innacurate reconstruction in the most common case.
Opening this as a draft for now, to show where I'd like to go with https://gitlab.winehq.org/wine/wine/-/merge_requests/2062.
-- v4: winex11: Use KbdLayerDescriptor for ToUnicodeEx. win32u: Force US layout in ToUnicode when CTRL is pressed. winex11: Use KbdLayerDescriptor for VkKeyScanEx. winex11: Use KbdLayerDescriptor for MAPVK_VK_TO_CHAR. winex11: Fill the Xkb layout KBDTABLES VkToWchar tables. winex11: Use KbdLayerDescriptor for GetKeyNameText. winex11: Fill the Xkb layout KBDTABLES KeyNames tables. winex11: Use KbdLayerDescriptor for MapVirtualKeyEx. winex11: Create KBDTABLES with VSCtoVK tables for Xkb layouts. winex11: Lookup xkb layout in KbdLayerDescriptor. win32u: Introduce KbdLayerDescriptor user driver entry. winex11: Get rid of now unnecessary EVENT_event_to_vkey. server: Convert CTRL + VK_PAUSE to VK_CANCEL. winex11: Drop now unnecessray nonchar_key_vkey table. winex11: Drop now unnecessary keyboard layout detection code. winex11: Use static scan code to vkey mapping tables. winex11: Support fixed X11 keycode to scancode conversion. winex11: Use scancode high bit to set KEYEVENTF_EXTENDEDKEY flag. winex11: Don't update the keyboard layouts on MappingNotify. winex11: Stop sending WM_INPUTLANGCHANGEREQUEST on MappingNotify. winex11: Send WM_INPUTLANGCHANGEREQUEST when Xkb group changes. crypt32: Avoid using uninitialized memory. winex11: Compute Xkb keyboard layout ID and language. winex11: Keep a list of every known Xkb keyboard layout. winex11: Read the _XKB_RULES_NAMES root window property. winex11: Listen to _XKB_RULES_NAMES root window property changes. win32u: Avoid accessing NULL key name string pointer. win32u: Init vsc2char in NtUserMapVirtualKeyEx only if necessary. win32u: Init vsc2vk in NtUserMapVirtualKeyEx only if necessary. win32u: Init vsc2vk in NtUserGetKeyNameText only if necessary.
This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/wine/-/merge_requests/2122
Fix a crash that caused some dinput test failures.