Cross-platform win32-input-mode usage #11514

Open
opened 2026-01-31 02:49:50 +00:00 by claunia · 0 comments
Owner

Originally created by @o-sdn-o on GitHub (Nov 20, 2020).

Description of the new feature/enhancement

By creating this issue, I would like to start a public discussion about what could be changed in the current design of the win32-input-mode protocol before it becomes widespread and cross-platform.

The Considerations section states:

612b00cd44/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md (L60-L62)

At the same time, the section Future Considerations allows cross-platform use:

612b00cd44/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md (L411-L416)

Improvements

List of possible improvements, issues and use cases not covered by this keyboard protocol:

Originally created by @o-sdn-o on GitHub (Nov 20, 2020). # Description of the new feature/enhancement By creating this issue, I would like to start a public discussion about what could be changed in the current design of the [`win32-input-mode` protocol](https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md) before it becomes widespread and cross-platform. The `Considerations` section states: https://github.com/microsoft/terminal/blob/612b00cd445470fa85d2f71dc94930f03ebe4823/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md?plain=1#L60-L62 At the same time, the section `Future Considerations` allows cross-platform use: https://github.com/microsoft/terminal/blob/612b00cd445470fa85d2f71dc94930f03ebe4823/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md?plain=1#L411-L416 ## Improvements List of possible improvements, issues and use cases not covered by this keyboard protocol: - ~~No way to restore the normal mode of the terminal when the connection is lost or the application crashes.~~ https://github.com/microsoft/terminal/issues/8343#issuecomment-1586225095 - Support `win32-input-mode` request acknowledgment with the current state of keyboard modifiers. - Req: `^[[?9001h` - Ack: `^[[0;0;0;0;CtrlState;0_` - Support for <kbd>LeftShift</kbd> and <kbd>RightShift</kbd> modifiers along with <kbd>Shift</kbd>. - Support for Unicode codepoint decimal value (for BaseCharacter) instead of UnicodeChar (Uc), which currently represents one UTF-16 code unit (wchar_t). `^[[Vk;Sc;Uc;Kd;Cs;Rc_` => `^[[Vk;Sc;BaseCharacter;Kd;Cs;Rc_` - Support for passing/receiving an entire [grapheme cluster](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) as one keyboard event in order to get it by a single ReadKey call, e.g. getting an accented letter `á` represented as a sequence of [codepoints](https://en.wikipedia.org/wiki/Code_point). (`GC` = `BaseCharacter` + `Codepoint1` + `Cp2` + … + `CpN`). #2853 https://github.com/microsoft/terminal/issues/8343#issuecomment-1586225095 https://github.com/microsoft/terminal/issues/8343#issuecomment-1586288563 Possible solution: - Add continuing codepoints as optional arguments to the event sequence: `^[[Vk;Sc;BaseCharacter;Kd;Cs;Rc [ ; Codepoint1 ; Cp2 ; … ; CpN ] _` - Sending clipboard data without additional generation of keystroke sequence, since this data must already be enclosed (mandatory [bracketed paste mode](https://en.wikipedia.org/wiki/Bracketed-paste)).
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 02:49:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11514