[PR #1974] Mark ESC as handled so that it doesn't come back in CharacterHandler #24743

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

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

State: closed
Merged: Yes


Fixes #1295.

Summary of the Pull Request

There are four places where we could possibly fix this.

  1. mark it handled manually in KeyDownHandler (like Tab)
  2. "handle it manually" in TerminalCore (like Ctrl+Space and friends)
  3. ignore it in CharacterHandler (like Bksp and Del)
  4. "handle it automatically" in TerminalCore by removing it from TerminalInput
    • i cannot figure out why it's in there -- it's in the keypad numeric and keypad application mappings, but it doesn't actually get remapped?

fad7638bb3/src/terminal/input/terminalInput.cpp (L55)
fad7638bb3/src/terminal/input/terminalInput.cpp (L88)

I just chose one. Why not here? We should document what each of those does and why they are they way they are.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/1974 **State:** closed **Merged:** Yes --- Fixes #1295. ## Summary of the Pull Request There are four places where we could possibly fix this. 1. mark it handled manually in KeyDownHandler (like <kbd>Tab</kbd>) 2. "handle it manually" in TerminalCore (like <kbd>Ctrl+Space</kbd> and friends) 3. ignore it in CharacterHandler (like <kbd>Bksp</kbd> and <kbd>Del</kbd>) 4. "handle it automatically" in TerminalCore by removing it from TerminalInput * i cannot figure out why it's in there -- it's in the keypad numeric _and_ keypad application mappings, but it doesn't actually get remapped? https://github.com/microsoft/terminal/blob/fad7638bb39d5c5107431605a1adf50010f8646a/src/terminal/input/terminalInput.cpp#L55 https://github.com/microsoft/terminal/blob/fad7638bb39d5c5107431605a1adf50010f8646a/src/terminal/input/terminalInput.cpp#L88 I just chose one. Why not here? We should document what each of those does and why they are they way they are. ## PR Checklist * [x] Closes #1295 * [x] I work here * [ ] I have not yet added tests, so the box to the left is as empty as can be
claunia added the pull-request label 2026-01-31 09:05:06 +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#24743