[PR #1267] The InputStateMachine should dispatch Intermediate characters #24562

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

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

State: closed
Merged: Yes


Summary of the Pull Request

The OutputStateMachine needs to collect "Intermediate" characters to be able to call Designate G0 Character Set (as well as other sequences we don't yet support).

However, the InputStateMachine used by conpty to process input should not collect these characters. The input engine uses \x1b as an indicator that a key was pressed with Alt. For keys like /, we want to dispatch the key immediately, instead of collecting it and leaving us in the Escape state.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/1267 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request The OutputStateMachine needs to collect "Intermediate" characters to be able to call [`Designate G0 Character Set`](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Controls-beginning-with-ESC) (as well as other sequences we don't yet support). However, the InputStateMachine used by conpty to process input should _not_ collect these characters. The input engine uses `\x1b` as an indicator that a key was pressed with `Alt`. For keys like `/`, we want to dispatch the key immediately, instead of collecting it and leaving us in the Escape state. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1209 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [x] I've discussed this with core contributors already.
claunia added the pull-request label 2026-01-31 09:04:01 +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#24562