[PR #17833] Avoid dropping Esc characters from VT responses #31386

Open
opened 2026-01-31 09:46:55 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/17833

State: closed
Merged: Yes


GetChar checks if the vkey is VK_ESCAPE. CharToKeyEvents however
tries really hard to figure out the vkeys of all characters.
To avoid these issues all we need to do is to simply use the existing
WriteString function we already use for all other VT responses.
If it's good for conhost responses, it's good for ConPTY responses.

Additionally, this removes another IsVtInputEnabled which was
redundant with WriteString which worked exactly the same internally.

Closes #17813
Closes #17851
Probably also related to #17823

Validation Steps Performed

  • Wrote a small app to send and receive a DA1 request. It works
  • WSL already worked to begin with (and still works now)
  • No double-encoding of mouse input events
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17833 **State:** closed **Merged:** Yes --- `GetChar` checks if the vkey is VK_ESCAPE. `CharToKeyEvents` however tries really hard to figure out the vkeys of all characters. To avoid these issues all we need to do is to simply use the existing `WriteString` function we already use for all other VT responses. If it's good for conhost responses, it's good for ConPTY responses. Additionally, this removes another `IsVtInputEnabled` which was redundant with `WriteString` which worked exactly the same internally. Closes #17813 Closes #17851 Probably also related to #17823 ## Validation Steps Performed * Wrote a small app to send and receive a DA1 request. It works ✅ * WSL already worked to begin with (and still works now) ✅ * No double-encoding of mouse input events ✅
claunia added the pull-request label 2026-01-31 09:46:55 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31386