CTRL key issue after switching tab with CTRL+Tab
Windows Terminal version
1.23.12811.0
Windows build number
10.0.26200.0
Other Software
WSL Version : 2.6.1.0 / Ubuntu 24.04.3 Kernel Version : 6.6.87.2-1
I'm using a keyboard with french layout
$ Get-WinUserLanguageList
LanguageTag : fr-FR
Autonym : Français (France)
EnglishName : French
LocalizedName : Français (France)
ScriptName : Latin
InputMethodTips : {040C:0000040C}
Spellchecking : True
Handwriting : False
Steps to reproduce
- Open a wsl tab
- Open another wsl tab
- CTRL+Tab to go the 1st tab and launch
showkey -a - Type \ (it displays
\ 92 0134 0x5c) - CTRL+Tab twice (go the 2nd tab and back to the 1st)
- Type \ (it displays
^\ 28 0034 0x1c)
Expected Behavior
It should display \ 92 0134 0x5c as the 1st time
Actual Behavior
It displays ^\ 28 0034 0x1c (CTRL+)
Thanks for reporting this issue! I can confirm this is related to keyboard state handling after tab switching with CTRL+Tab. This seems like an important bug to track for users with non-US keyboard layouts.
Huh, do you still see this issue if you test it out in terminal preview?
Huh, do you still see this issue if you test it out in terminal preview?
Yes, tested with version 1.24.2682.0
FWIW, I can also reproduce this with the Canary build (1.25.3361.0).
And note that on a French keyboard, the \ is AltGr+8, which in Windows is technically Ctrl+Alt+8. So this is one of those cases where we've got to try and guess whether the Ctrl key press is real or not. It's possible the source of the issue may be in that code.
However, it's also possible this may be a higher level issue with release events not being sent to the window when the key is released after the window loses focus. We've had issues before that sound somewhat similar to this (#14904, #16385, #18661).