Cannot create a binding to output Esc only #22093

Open
opened 2026-01-31 08:03:13 +00:00 by claunia · 1 comment
Owner

Originally created by @yerlaser on GitHub (Aug 14, 2024).

Windows Terminal version

No response

Windows build number

No response

Other Software

No response

Steps to reproduce

Try to create a new binding to output Esc character (\x1B)

Expected Behavior

Pressing the binding should send Esc character to the app

Actual Behavior

Nothing gets sent, which in WSL can be confirmed by running cat program.
Interestingly, it is possible to create a binding that sends Escape Sequences, e.g. Alt-q (\x1Bq), but not the Esc itself.

Originally created by @yerlaser on GitHub (Aug 14, 2024). ### Windows Terminal version _No response_ ### Windows build number _No response_ ### Other Software _No response_ ### Steps to reproduce Try to create a new binding to output Esc character (\x1B) ### Expected Behavior Pressing the binding should send Esc character to the app ### Actual Behavior Nothing gets sent, which in WSL can be confirmed by running `cat` program. Interestingly, it is possible to create a binding that sends Escape Sequences, e.g. `Alt-q` (\x1Bq), but not the Esc itself.
claunia added the Issue-BugArea-VTProduct-Conpty labels 2026-01-31 08:03:13 +00:00
Author
Owner

@carlos-zamora commented on GitHub (Aug 14, 2024):

Thanks for filing. As a workaround, you can set your sendInput sequence to \u001b[27;1;27;1;0;1_\u001b[27;1;27;0;0;1_. This sends it as a win32 input sequence.

As for solutions on our end:

  1. there's a bug where we drop escape characters at the end of the input chunk. They shouldn't get lost.
  2. add a timeout such that the escape characters are flushed out to the application.
@carlos-zamora commented on GitHub (Aug 14, 2024): Thanks for filing. As a workaround, you can set your sendInput sequence to `\u001b[27;1;27;1;0;1_\u001b[27;1;27;0;0;1_`. This sends it as a win32 input sequence. As for solutions on our end: 1. there's a bug where we drop escape characters at the end of the input chunk. They shouldn't get lost. 2. add a timeout such that the escape characters are flushed out to the application.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22093