-
Notifications
You must be signed in to change notification settings - Fork 9.2k
VT mouse sequences don't work when DECARM is disabled #16510
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
1.19.3172.0
Windows build number
10.0.19045.3803
Other Software
Vttest
Steps to reproduce
vttest.Expected Behavior
You should see the mouse escape sequence starting with
<27> [ M <32>output near the top of the page, and a1output wherever you've clicked.Actual Behavior
Some of the characters in the mouse sequence are lost, so it starts with
<27> <32>, and there is nothing output in the cell where you've clicked.This is similar to the problem we had with the Device Attribute reports not working in vttest because it disables auto-repeat mode (#14208). But in this case the lost key events are coming from conpty passing the mouse sequences through
TerminalInput::HandleKey, so it only affects Windows Terminal.The fact that the mouse sequences are being treated as keypresses is already questionable, and I think that's likely the cause of #15083, but I also think
HandleKeyshould be capable of accepting a sequence of key events with a0virtual key (as a form of input "passthrough"), withoutDECARMgetting in the way.So my proposed solution is this: before we even check for repeated keys, if we receive a key-down event, and the virtual key code is
0orVK_PACKET(which serves a similar purpose), then we should immediately return the givenUnicodeCharvalue as theHandleKeyoutput.