neo-quertz Layout not working in X11 applications in wslg
Windows build number:
10.0.19042.2728
Your Distribution version:
20.04
Your WSL versions:
WSL-Version: 1.1.3.0 Kernelversion: 5.15.90.1 WSLg-Version: 1.0.49 MSRDC-Version: 1.2.3770 Direct3D-Version: 1.608.2-61064218 DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows Version: 10.0.19042.2728
Steps to reproduce:
- Install reneo in windows and activate the neo_quertz Keyboard Layout
- Start a wslg Application e.g. gedit
- Try to create e.g. a Square Bracket bei pressing CAPS-LOCK + e
Result is that NO character is displayed at all.
WSL logs:
No response
WSL dumps:
No response
Expected behavior:
Square Brackets should be working with neo-quertz keyboard layout.
Actual behavior:
Square Brackets and curly braces can't be created at all.
This could be somehow related to
- https://github.com/microsoft/wslg/issues/749
- https://github.com/microsoft/wslg/issues/517
Workarounds mentioned there doesn't seem to work in my case.
It's working here now, with the following workaround setup:
- kbdneo installed (probably not neccessary with this workaround, but it's my setup)
- ReNeo config:
{
...
"standaloneMode": false,
"blacklist": [
{
"windowTitle": "Ubuntu"
}
],
}
- Don't disable standalone mode if you don't use the kbdneo driver!
- This is neccessary so ReNeo doesn't enable the Numpad in WSLg, which locks Layer 4 (#749)
- If you use a different distro, check what your window title contains when running any GUI application within WSL and use that instead
- Save the following as a .cmd file:
wsl.exe --system --user root bash -c "echo '[keyboard]' >> /home/wslg/.config/weston.ini"
wsl.exe --system --user root bash -c "echo 'keymap_layout=de' >> /home/wslg/.config/weston.ini"
wsl.exe --system --user root bash -c "echo 'keymap_variant=neo_qwertz' >> /home/wslg/.config/weston.ini"
wsl.exe --system --user root bash -c "pkill -HUP weston"
Now, whenever you run wsl, before launching a GUI application, you run the above .cmd file.
If you want your wsl sessions to persist, so you have to run this command a little less often, try starting your normal wsl session with a shortcut to wsl.exe --exec dbus-launch true.
Occasionally, your Linux environment will get stuck in layer 4 when switching between Windows and Linux applications. When this happens, you need to switch to a Windows application, toggle NumPad, and switch back to the Linux application.
Thanks for your workaround. Works for me, too. But only, if using kbdneo. Maybe this helps for someone else...