-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Alt arrow keys on numpad transmit extra characters in conhost #16508
Copy link
Copy link
Closed
Labels
Area-VTVirtual Terminal sequence supportVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.In-PRThis issue has a related PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsProduct-ConhostFor issues in the Console codebaseFor issues in the Console codebase
Metadata
Metadata
Assignees
Labels
Area-VTVirtual Terminal sequence supportVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.In-PRThis issue has a related PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsProduct-ConhostFor issues in the Console codebaseFor issues in the Console codebase
Windows Terminal version
Commit 63c3573
Windows build number
10.0.19045.3803
Other Software
No response
Steps to reproduce
showkey -aExpected Behavior
You should just see the VT escape squence for Alt+RightArrow:
Actual Behavior
The escape sequence is followed by an extra
♠character, so it looks like this:The problem is that the combination of the Alt key with a digit on the numeric keyboard causes it to be interpreted as an Alt-Numpad input, in addition to the VT key sequence. So when the Alt key is released, it transmits character 6 (the RightArrow digit) in codepage 437, namely
♠.This is similar to issue #3101, only that was in Windows Terminal, and I think the underlying cause is possibly different.