Build 18309 has key encoding problems under X? #513

Closed
opened 2026-01-30 21:54:03 +00:00 by claunia · 2 comments
Owner

Originally created by @nicferrier on GitHub (Jan 8, 2019).

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.18309.1000]

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

Use British keyboard
Start WSL
Start an X app that requires input, say: gvim
Type " character - requires double press and produces wrong symbol

Here's the xev of this happening:

KeyPress event, serial 30, synthetic NO, window 0x400001,
    root 0xc2, subw 0x400002, time 4349515, (43,46), root:(1554,1646),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x400001,
    root 0xc2, subw 0x400002, time 4350140, (43,46), root:(1554,1646),
    state 0x1, keycode 11 (keysym 0xfe57, dead_diaeresis), same_screen YES,
    XLookupString gives 2 bytes: (c2 a8) "¨"
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: True

KeyRelease event, serial 33, synthetic NO, window 0x400001,
    root 0xc2, subw 0x400002, time 4350234, (43,46), root:(1554,1646),
    state 0x1, keycode 11 (keysym 0xfe57, dead_diaeresis), same_screen YES,
    XLookupString gives 2 bytes: (c2 a8) "¨"
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x400001,
    root 0xc2, subw 0x400002, time 4350421, (43,46), root:(1554,1646),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

This shows me pressing Shift and 2 (which is british keyboard double quote) and as you can see it's mapped to "dead_diaeresis".

  • What's wrong / what should be happening instead:

The correct double quote key should be coming out.

This also happens with the single quote key, which produces a backquote.

I can fix this behaviour with the following:

Kill the X server.
Switch the Windows keyboard to US
Start the X server.
Check apps: working
Kill the X server.
Switch the Windows keyboard to UK
Start the X server.
Check double quote working? Yes.

I will investigate further.

Originally created by @nicferrier on GitHub (Jan 8, 2019). * Your Windows build number: (Type `ver` at a Windows Command Prompt) Microsoft Windows [Version 10.0.18309.1000] * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) Use British keyboard Start WSL Start an X app that requires input, say: gvim Type " character - requires double press and produces wrong symbol Here's the xev of this happening: ``` KeyPress event, serial 30, synthetic NO, window 0x400001, root 0xc2, subw 0x400002, time 4349515, (43,46), root:(1554,1646), state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 33, synthetic NO, window 0x400001, root 0xc2, subw 0x400002, time 4350140, (43,46), root:(1554,1646), state 0x1, keycode 11 (keysym 0xfe57, dead_diaeresis), same_screen YES, XLookupString gives 2 bytes: (c2 a8) "¨" XmbLookupString gives 0 bytes: XFilterEvent returns: True KeyRelease event, serial 33, synthetic NO, window 0x400001, root 0xc2, subw 0x400002, time 4350234, (43,46), root:(1554,1646), state 0x1, keycode 11 (keysym 0xfe57, dead_diaeresis), same_screen YES, XLookupString gives 2 bytes: (c2 a8) "¨" XFilterEvent returns: False KeyRelease event, serial 33, synthetic NO, window 0x400001, root 0xc2, subw 0x400002, time 4350421, (43,46), root:(1554,1646), state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False ``` This shows me pressing Shift and 2 (which is british keyboard double quote) and as you can see it's mapped to "dead_diaeresis". * What's wrong / what should be happening instead: The correct double quote key should be coming out. This also happens with the single quote key, which produces a backquote. I can fix this behaviour with the following: Kill the X server. Switch the Windows keyboard to US Start the X server. Check apps: working Kill the X server. Switch the Windows keyboard to UK Start the X server. Check double quote working? Yes. I will investigate further.
claunia added the Resolution-External label 2026-01-30 21:54:03 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 8, 2019):

Hey @nicferrier,
Thanks for reporting this! So, this looks interesting.

The key events seen by an X client are, as you've indicated, generated by the X server. Since you're likely to be using Vcxsrv, Xming, X410, or any of a number of other X servers, you'll probably have to raise this keyboard layout mismatch issue over there. The console (and actually, WSL(!)) is, unfortunately, not involved in that X server's generation of events.

I'll have to close this since it's not a console issue, but I'm interested in seeing what the conclusion ends up being!

@DHowett-MSFT commented on GitHub (Jan 8, 2019): Hey @nicferrier, Thanks for reporting this! So, this looks interesting. The key events seen by an X client are, as you've indicated, generated by the X server. Since you're likely to be using Vcxsrv, Xming, X410, or any of a number of other X servers, you'll probably have to raise this keyboard layout mismatch issue over there. The console (and actually, WSL(!)) is, unfortunately, not involved in that X server's generation of events. I'll have to close this since it's not a console issue, but I'm interested in seeing what the conclusion ends up being!
Author
Owner

@nicferrier commented on GitHub (Jan 8, 2019):

Thanks. It was a long shot that you'd take a look. I'm sure it's not an X server issue since I've been using WSL with X for nearly a year. This issue only started showing up wth the Console rebuild before Christmas, which had other issues.

The reason I reported it is because it seems super weird, is quite specific (I doubt anyone using a US keyboard is going to see it) and because it might pertain to a deeper problem.

It may be more of a WSL issue. It's hard to tell the boundary between you two.

But I get why you've closed it.

@nicferrier commented on GitHub (Jan 8, 2019): Thanks. It was a long shot that you'd take a look. I'm sure it's not an X server issue since I've been using WSL with X for nearly a year. This issue only started showing up wth the Console rebuild before Christmas, which had other issues. The reason I reported it is because it seems super weird, is quite specific (I doubt anyone using a US keyboard is going to see it) and because it *might* pertain to a deeper problem. It may be more of a WSL issue. It's hard to tell the boundary between you two. But I get why you've closed it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#513