microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
9.9k stars 296 forks source link

Hungarian 101 key qwerty layout mapped to a wrong variant in GUI apps #1255

Open alaczi opened 3 weeks ago

alaczi commented 3 weeks ago

Windows build number:

Microsoft Windows NT 10.0.22631.0

Your Distribution version:

22.04

Your WSL versions:

PS C:\Users\laczi> wsl.exe --version WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.3593

Steps to reproduce:

  1. Install wsl with ubuntu 22.04
  2. In windows add English (United Kingdom) and Hungarian (101-key QWERTY) keyboard layout 3, Start a GUI app in wsl 4, Switch between keyboard layouts using WIN+Space combination 5, Observe the y and z is switched when using hungarian layout (so its QWERTZ not QWERTY layout)

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

No response

Actual behavior:

I have an en-gb keyboard and I use two layouts: EN-GB and Hungaryan 101key qwerty. When I switch between the two layouts the hungarian qwerty is mapped as qwertz in gui apps.

I see this in weston log:

[10:50:58.591] Client: LanguageImeInfo: ProfileType: 2 (TF_PROFILETYPE_KEYBOARDLAYOUT)
[10:50:58.591] Client: LanguageImeInfo: LanguageID: 0x40e
[10:50:58.591] Client: LanguageImeInfo: LanguageProfileCLSID: GUID_NULL : 00000000-0000-0000-0000-000000000000
[10:50:58.591] Client: LanguageImeInfo: ProfileGUID: GUID_NULL : 00000000-0000-0000-0000-000000000000
[10:50:58.591] Client: LanguageImeInfo: KeyboardLayout: 0x1040e
[10:50:58.591] convert_rdp_keyboard_to_xkb_rule_names: matching model=pc105 layout=hu variant=standard options=(null)
[10:50:58.594] rail_client_LanguageImeInfo_callback: new keyboard layout: 0x1040e

if I set the layout manually from the console with the following command:

setxkbmap hu -model pc105 -variant qwerty

The layout is good in gui apps but it only lasts until I switch back and forth.

This has been good for a while and now something has changed with an update.