Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt Gr not working on wslg applications #890

Open
nicoborghi opened this issue Nov 15, 2022 · 6 comments
Open

Alt Gr not working on wslg applications #890

nicoborghi opened this issue Nov 15, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@nicoborghi
Copy link

Windows build number:

10.0.22623.0

Your Distribution version:

20.04

Your WSL versions:

WSL version: 0.70.5.0
Kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22623.885

Steps to reproduce:

(Tested with both Ubuntu 20.04 and Debian 11, IT ISO keyboard)

  1. Open any GUI application (e.g., xev)
  2. Press Alt Gr
  3. Alt Gr does not work (no event is recorded in xev)
  • It works on Windows Terminal
  • It works when using x410

I tried changing the keyboard configuration with setxkbmap as suggested elsewhere, but it did not solve the issue.

WSL logs:

pulseaudio.log
weston.log
stderr.log

WSL dumps:

No response

Expected behavior:

Alt Gr key combinations work / Alt Gr key stroke is recorded by xev

Actual behavior:

Nothing

@nicoborghi nicoborghi added the bug Something isn't working label Nov 15, 2022
@hideyukn88
Copy link
Member

@nicoborghi, thanks for reporting the issue, WSLg utilize remote desktop protocol (RDP) and this is known issue with RDP, see #88 (comment), thanks!

@dermoth
Copy link

dermoth commented Mar 13, 2023

Humm and it's still not fixed? Why is is even so complex? I've been running X apps for years on WSL using VcXsrv, and although WSL2 requires a bit more work to make it connect with proper access control I've never had any issue with keyboard mapping or anything else.

I've installed t on WSL2 last week-end and initially thought it was forwarding the connection to the local system... I spent an hour trying to troubleshoot a non-existent VcXsrv issue when I realized it was using Windows's X server!.

@Robbson
Copy link

Robbson commented Oct 11, 2023

Any news on this? I get a recording of the key in xev so all seems fine but still, it doesn't work.

@dermoth
Copy link

dermoth commented Oct 11, 2023

I would suggest using VcXsrv.exe, available on SF.net and also bundled with X2go.

On WSL1 it's very easy as you can connect directly to localhost (DISPLAY=:0 IIRC). For WSL2 it's trickier, you need to add the WSL's IP to your workstation's xhosts, and your workstation's IP to the WSL's DISPLAY env (it used to work with the hostname, iirc %COMPUTERNAME%.local., but is no longer the case and I have to fetch the IP address now).

I can share my updated launcher script, may need some polishing (I need to look for a way to get the ip from powershell rather than running a WSL command) . It launches an X terminal on Debian from where I can work and run other GUI apps.

I also prefer the clipboard handling with VcXsrv, iirc the primary clipboard wasn't synced to/from Windows' unique clipboard like it's normally the case with most X emulators (copy on select) and X servers for Windows.

@Robbson
Copy link

Robbson commented Oct 12, 2023

@dermoth
Thanks, but we are coming from VcXsrv. Even when not using the performant VAIL mode for WSLg, it's a lot faster, especially in fullscreen applications. Also VcXsrv leads to problems on Windows remote machines where instances are suddenly closed when you make a short break and come back to the machine later. Very unfortunate when you have tons of windows open. Also because of firewall issues you always have to start the apps using VcXsrv from the shell, the linux app links from Windows just won't work.

The thing is, we have it already successfully running on several local Windows 10 and 11 machines without this problem. But in this case we are working on remote Windows machines and using WSL there. Those Alt Gr key comobs working fine for the WSL terminal, apps using VcXsrv and everywhere else but not in WSLg apps (X11 or Wayland).

@taufderl-anvil
Copy link

I am having the same issue and after years of frustration this is pushing me back to native Linux. WSL without proper keyboard layout support does not work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants