Keyboard bindings for terminal escape sequences. #16222

Closed
opened 2026-01-31 05:01:03 +00:00 by claunia · 4 comments
Owner

Originally created by @Chaz6 on GitHub (Dec 21, 2021).

Description of the new feature/enhancement

I would like to be able to create key bindings for terminal escape sequences. For example, I would like to bind ctrl+tab to \x1B[27;5;9~ and ctrl+shift+tab to \x1B[27;6;9~.

Proposed technical implementation details (optional)

Originally created by @Chaz6 on GitHub (Dec 21, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I would like to be able to create key bindings for terminal escape sequences. For example, I would like to bind `ctrl+tab` to `\x1B[27;5;9~` and `ctrl+shift+tab` to `\x1B[27;6;9~`. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 05:01:04 +00:00
Author
Owner

@j4james commented on GitHub (Dec 21, 2021):

You can already achieve this with a sendInput action (see PR #7249). For example, try adding the following comands in the actions section of you settings.json file:

{ "command": { "action": "sendInput", "input": "\u001b[27;5;9~" }, "keys": "ctrl+tab" },
{ "command": { "action": "sendInput", "input": "\u001b[27;6;9~" }, "keys": "ctrl+shift+tab" }
@j4james commented on GitHub (Dec 21, 2021): You can already achieve this with a `sendInput` action (see PR #7249). For example, try adding the following comands in the _actions_ section of you _settings.json_ file: ``` { "command": { "action": "sendInput", "input": "\u001b[27;5;9~" }, "keys": "ctrl+tab" }, { "command": { "action": "sendInput", "input": "\u001b[27;6;9~" }, "keys": "ctrl+shift+tab" } ```
Author
Owner

@Chaz6 commented on GitHub (Dec 21, 2021):

Thank you! Sorry if I missed it in the documentation.

@Chaz6 commented on GitHub (Dec 21, 2021): Thank you! Sorry if I missed it in the documentation.
Author
Owner

@j4james commented on GitHub (Dec 21, 2021):

No worries. I also originally thought it wasn't documented, but I see now there are actually some docs here:
https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#send-input

@j4james commented on GitHub (Dec 21, 2021): No worries. I also originally thought it wasn't documented, but I see now there are actually some docs here: https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#send-input
Author
Owner

@Chaz6 commented on GitHub (Dec 21, 2021):

Thanks very much 😊

@Chaz6 commented on GitHub (Dec 21, 2021): Thanks very much 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16222