Thanks for the review! One general question: does the general approach / order seem reasonable? For a very high level view: - introduce a tiny bit more smarts into the old `X11DRV_KEYBOARD_DetectLayout()`[https://gitlab.winehq.org/Mystral/wine/-/commit/7ef5e7436f5b0a689d152aeedd22...] - introduce `struct layout` and store the `LANGID`s detected via xkbregistry, e.g. [https://gitlab.winehq.org/Mystral/wine/-/commit/b35f3171256d0c96d756506b1f66...] - add fallback `struct layout` entries if the Xkb + xkbregistry route fails [https://gitlab.winehq.org/Mystral/wine/-/commit/e96172e24c8c9c9b92360a76756e...] - always use `struct layout` for keyboard layout stuff, e.g. [https://gitlab.winehq.org/Mystral/wine/-/commit/6f3a9d4708c13f9a2749b5ae511d...] -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10550#note_135326