Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_keyboard.c:
+} + +static void set_current_xkb_group(xkb_layout_index_t xkb_group) +{ + struct wayland_keyboard *keyboard = &process_wayland.keyboard; + LCID locale = LOWORD(NtUserGetKeyboardLayout(0)); + HKL hkl = keyboard->last_hkl; + struct layout *layout; + + LIST_FOR_EACH_ENTRY(layout, &xkb_layouts, struct layout, entry) + if (layout->xkb_group == xkb_group) break; + if (&layout->entry == &xkb_layouts) + ERR("Failed to find Xkb Layout for group %d\n", xkb_group); + else + { + if (!layout->layout_id) hkl = (HKL)(UINT_PTR)MAKELONG(locale, layout->lang); Could you please elaborate on why the first layout in a keymap for each language is treated specially in terms of HKL (i.e., HIWORD is `lang`)? Is there some API (or internal Wine) expectation for this being the case?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4102#note_50615