Ctrl+Alt+[Left/Right Arrow] shortcut
Environment
Windows build number: 10.0.21376.0
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.19
Steps to reproduce
- Open IntelliJ IDEA from WSL
- Click Ctrl+Alt+Left Arrow or Ctrl+Alt+Right Arrow to navigate to different parts of code
Expected behavior
I would expect the shortcut to be captured by the IDE and navigate back/forward
Actual behavior
It seems that the keyboard shortcust is captured from WSLg, sometimes causing the IDE to crash, or other times to disappear (both the window and the taskbar icon) and re-appear after a few seconds (with changed icon in the taskbar)
Same issue here. Happens with other programs as well, like Gimp. Pressing ctrl+alt+left and then escape makes weird stuff happen. Wonder if it's because it's normally a way to switch workspace in Ubuntu?
Tried disabling it https://askubuntu.com/questions/82007/how-do-i-disable-ctrlaltleft-right but no difference.
Ohh well, I've earlier had to remap the keybinding in intellij / pycharm to shift+alt+left/right instead, as ctrl+alt+left/right was used for some VM/thin client stuff.
Hi, thank you for reporting the issue, I'm not familiar with that specific application's behaver, but tried using "xev -event keyboard" to see what keystroke events were sent, and the last arrow input is not sent to xev, but it's recognized as release of L-Control and L-Alt key (even I'm pressing those keys).
Doing same on Ubuntu desktop (running natively, not on WSLg), the last arrow (Left or Right) input is not delivered to xev, too, but pressing arrow key doesn't generate release of other 2 keys. By default, Ctrl+Alt+Arrow Up/Down seems assigned to work space change shortcut, this might be related, but I'm not sure.
If you have a working settings (means the key combination works with applications) with other Linux environment, would you please check what do you see with xev with that key combination ? thanks!
[Below is what I see with WSLg]
I pressed L-Control KeyPress event, serial 28, synthetic NO, window 0x1000001, root 0x515, subw 0x1000002, time 182396889, (50,42), root:(2626,604), state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
I pressed L-Alt (while holding L-Control KeyPress event, serial 28, synthetic NO, window 0x1000001, root 0x515, subw 0x1000002, time 182400009, (50,42), root:(2626,604), state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
I pressed Left-Arrow (while holding L-Control and L-Alt) KeyRelease event, serial 28, synthetic NO, window 0x1000001, root 0x515, subw 0x1000002, time 182402431, (50,42), root:(2626,604), state 0x1c, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x1000001, root 0x515, subw 0x1000002, time 182402431, (50,42), root:(2626,604), state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
Actually, at least on my environment, the last array key input is not delivered from Windows side, the key sequence Windows sends to WSLg matches what shows in xev. If this is the case, I think you will need to remap the shortcut to something-else. I will continue to check if this is used for some shortcut at Windows side.
[12:54:28.503] RDP backend: xf_input_keyboard_event code=1d ext=0 vk_code=a2 scan_code=25 pressed=1, idle_inhibit=1 [12:54:28.864] RDP backend: xf_input_keyboard_event code=38 ext=0 vk_code=a4 scan_code=40 pressed=1, idle_inhibit=2 [12:54:29.234] RDP backend: xf_input_keyboard_event code=38 ext=0 vk_code=a4 scan_code=40 pressed=0, idle_inhibit=1 [12:54:29.234] RDP backend: xf_input_keyboard_event code=1d ext=0 vk_code=a2 scan_code=25 pressed=0, idle_inhibit=0
hi @hideyukn88 , thanks for taking a look at this.
I'm using VcXsrv to show Intellij, where the Ctrl+Alt+Arrows works as expected.
So, I started xev -event keyboard using VcXsrv as the display server and here is the output:
I pressed L-Ctrl KeyPress event, serial 25, synthetic NO, window 0x300001, root 0x36e, subw 0x0, time 3463312, (137,121), root:(273,280), state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
I pressed L-Alt while holding L-Ctrl KeyPress event, serial 28, synthetic NO, window 0x300001, root 0x36e, subw 0x0, time 3464406, (137,121), root:(273,280), state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
I pressed L-Arrow while holding L-Ctrl and L-Alt KeyPress event, serial 28, synthetic NO, window 0x300001, root 0x36e, subw 0x0, time 3466609, (137,121), root:(273,280), state 0x1c, keycode 100 (keysym 0xff51, Left), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x300001, root 0x36e, subw 0x0, time 3466703, (137,121), root:(273,280), state 0x1c, keycode 100 (keysym 0xff51, Left), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
** I released L-Alt** KeyRelease event, serial 28, synthetic NO, window 0x300001, root 0x36e, subw 0x0, time 3469437, (137,121), root:(273,280), state 0x1c, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
** I released L-Ctrl** KeyRelease event, serial 28, synthetic NO, window 0x300001, root 0x36e, subw 0x0, time 3469968, (137,121), root:(273,280), state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
Update: Ctrl+Alt+[Left/Right Arrow] is registered for other shortcut functionality in RDP client software at Windows side, this is why this key sequence is not reported to WSLg.
Ahh, I should have guessed that. As I commented I have had to remap that key binding earlier when using remote thin clients / rdp as well. It would take one out of the session and back to one's own computer.
OK, that was my initial though as well. Is there some way to disable it in the RDP client at Windows side? In fact, disable every shortcut in the RDP client?
Hi, yes, we have already followed up with the responsible team for RDP client software at Windows side, to give us an option to do so, unfortunately, due to the change in Windows, not in WSLg, the solution may not be available until future release of Windows, thanks for feedback!
I also confirm the problem, it appears in PyCharm(Java-based IDE) running in WSL with WSLG. Ctrl+Shift+RightArrow and Ctrl+Shift+LeftArrow modify the window width.
Strangely though, it does not appear in Geany(GTK3 application) running in WSL with WSLG. Same keys just do what they are supposed to do - select text to the next/previous word boundary.
Windows 10 build: 21390.2025
Edit: got Windows 11 with new update, build 22000.51, the issue is still there.
apparently the RDP client in the microsoft store doesn't have this behaviour...is it possible to configure which RDP client is used?
Hello, I also have this issue. Any update regarding this ? Did anyone find any workaround solution ??? Thanks !
Hello! Any updates or solutions?
I have the same issue, any updates?
The same issue((
@bluelu, we are working on this, and it is working internally, but this requires updates in RDP client software, thus it would require more coordination internally, thanks for checking!
@hideyukn88 If you can provide a solid fix for the RDP client always eating Ctrl+Alt+[Left/Right Arrow], that will also help users beyond wlsg! This has been an issue for a long time, see this post for example:
https://superuser.com/questions/327866/remote-desktop-sending-ctrl-alt-left-arrow-ctrl-alt-right-arrow-to-the-remote-p
@bluelu, we are working on this, and it is working internally, but this requires updates in RDP client software, thus it would require more coordination internally, thanks for checking!
Are there some upstream trackers to subscribe with?
I think that the topic is now gaining in importance: November 22nd, 2022 - The Windows Subsystem for Linux in the Microsoft Store is now generally available on Windows 10 and 11 - Github discussion
At least a workaround how to get a clean reconnect to a running application would be great.
Regarding
https://superuser.com/questions/327866/remote-desktop-sending-ctrl-alt-left-arrow-ctrl-alt-right-arrow-to-the-remote-p
Somehow rdp settings are also specified by options and read in the background from wslg.rdp / wslg_desktop.rdp files in "c:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.0.0.0_x64__8wekyb3d8bbwe\".
In those property files there could be switches for keyboard_hook ( see answer ).
But this wslg feature is really great news!
Environment
Windows build number: 10.0.21376.0 Your Distribution version: Ubuntu 20.04 Your WSLg version: 1.0.19Steps to reproduce
- Open IntelliJ IDEA from WSL
- Click Ctrl+Alt+Left Arrow or Ctrl+Alt+Right Arrow to navigate to different parts of code
Expected behavior
I would expect the shortcut to be captured by the IDE and navigate back/forward
Actual behavior
It seems that the keyboard shortcust is captured from WSLg, sometimes causing the IDE to crash, or other times to disappear (both the window and the taskbar icon) and re-appear after a few seconds (with changed icon in the taskbar)
Windows build number: 10.0.21376.0 Your Distribution version: Ubuntu 20.04 Your WSLg version: 1.0.19
I faced that obstacle and worked out the answer
https://middle-incomefactory-boy.github.io/YbDLM1HlehSjkxab7/