Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_keyboard.c:
layout->lang = lang; layout->index = index; if (index) layout->layout_id = next_layout_id++; + layout->key_names_str = names_str = (void *)ptr; + + switch (lang) + { + case MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT): scan2vk = scan2vk_azerty; + case MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT): scan2vk = scan2vk_qwertz; + case MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_SWISS): scan2vk = scan2vk_qwertz; + default: scan2vk = scan2vk_qwerty; + }
I assume that the way to add other layouts (e.g., dvorak, colemak) would be to create new scan2vk tables, correct? I wonder if it would be useful, in some cases at least, to have an `xkb_keysym_to_vk` function to fill the VSCtoVK table(s) automatically in the code below. So, instead of the current `keyc -> scan -> vk` we would have `keyc -> scan, keyc -> keysym -> vk`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4455#note_53492