Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary of the Pull Request This PR ensures that Conpty properly treats `^[^Z` and `^[^X` as <kbd>Ctrl+Alt+z</kbd> and <kbd>Ctrl+Alt+x</kbd>, instead of <kbd>Ctrl+z</kbd> and <kbd>Ctrl+x</kbd>. ## References ## PR Checklist * [x] Closes #4201 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments `^Z` and `^X` are special control characters, SUB and CAN. For the output state machine, these characters are supposed to be executed from _any_ state. However, we shouldn't do this for the input engine. With the current behavior, these characters are immediately executed regardless of what state we're in. That means we end up synthesizing <kbd>Ctrl+z/x</kbd> for these characters. However, for the InputStateMachine engine, when these characters are preceeded by `^[` (ESC), we want to treat them as <kbd>Ctrl+Alt+z/x</kbd>. This just adds a check in `StateMachine` to see if we should immediately execute these characters from any state, similar to many of the other exceptions we already perform in the StateMachine for the input engine. ## Validation Steps Performed * ran tests * checked `showkey -a` in gnome-terminal * checked `showkey -a` in conhost * checked `showkey -a` in vt pipeterm (conhost as a conpty terminal) * checked `showkey -a` in Windows Terminal
- Loading branch information