-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Incorrect DECRQM
for Win32InputMode
#17737
Comments
The more I think about this, the more I believe there may be a bigger problem with win32 input mode in general. Prior to the new passthrough, the terminal would have appeared as if win32 input mode was not enabled. With the new system, And apps that do enable win32 input mode will typically disable it when they exit. That's probably OK for WSL apps (assuming we fix the bug reported above), but if you're in a win32 shell, that's going to leave the system in a state where it doesn't report all the key combinations, which is not ideal. But it's even worse if the app tries to restore the mode to what it detected at startup, because in that case it'll exit with win32 input mode enabled, which will make a WSL shell unusable. And while it may be a good thing for win32 console apps that read |
I believe what's missing was a call to |
(#17757 may not help |
Does what it says on the tin. Part of #17737 ## Validation Steps Performed * In WSL run `printf "\e[?9001h"; sleep 1; printf "\e[?9001l"; read` * Wait 1s and press Enter * Run `showkey -a` * Esc works ✅
DECRQM
for Win32InputMode
Windows Terminal version
Commit 9b21b78
Windows build number
10.0.19045.4780
Other Software
No response
Steps to reproduce
printf "\e[?9001h"; sleep 1; printf "\e[?9001l"; read
showkey -a
Expected Behavior
You should see the VT codes for those keys like this:
Actual Behavior
Neither of those keys are picked up. And I think the problem is the heuristic we're using here:
terminal/src/terminal/parser/stateMachine.cpp
Lines 2055 to 2056 in 9b21b78
That works fine if win32 input mode is always on, or always off, but when it's toggled the
_encounteredWin32InputModeSequence
flag is never reset, so that branch is always skipped.I don't think this was an issue prior to the new VT passthrough because we never forwarded win32 input mode changes to conpty, so it should have been permanently enabled (assuming it was supported at all).
The text was updated successfully, but these errors were encountered: