-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VT sequences for Ctrl+Alt+? input (#4947)
## Summary of the Pull Request Ctrl+/ and Ctrl-? are complicated in VT input. * C-/ is supposed to be `^_` (the C0 character US) * C-? is supposed to be `DEL` * C-M-/ is supposed to be `^[^_` (ESC US) * C-M-? is supposed to be `^[^?` (ESC DEL) The astute reader will note that these characters also share the same key on a standard en-us keyboard layout, which makes the problem even more complicated. This PR does a better job of handling these weird cases. # References * #3079 - At first, I thought this PR would close this issue, but as I've learned below, this won't solve that one. This bug was merely found during that investigation. ## PR Checklist * [x] Related to #3079 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed * ran tests * checked `showkey -a` in gnome-terminal, which gives you the wrong results for C-M-/, C-M-? * checked `showkey -a` in xterm, which gives you the _right_ results for C-M-/, C-M-? * checked `showkey -a` in conhost * checked `showkey -a` in Windows Terminal (cherry picked from commit d50409b)
- Loading branch information
1 parent
266402a
commit 7deaf6b
Showing
2 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters