feat: Support Alt+key combinations#10767
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
jacob314
left a comment
There was a problem hiding this comment.
Looks generally good. Some of these comments are mainly questions. For keyboard support we have to be extremely careful and do absolutely the minimum rather than letting the logic get too complex.
…al-keys.txt with: - 4 terminals (iTerm2, Ghostty, MacTerminal, VSCodeTerminal) - 3 keys (a, o, m) with Alt modifier Fixed the implementation - Updated KeypressContext.tsx to handle Alt+letter in kitty protocol by changing one condition from ctrl && to (ctrl || alt)
838b5f6 to
5fec551
Compare
- Add comprehensive map for all Alt+A through Alt+Z combinations - Convert accented characters (å, ø, µ, ¥, etc.) to proper Alt+letter events - Fix Alt+Y handling for both backslash (\) and yen (¥) symbols
| // Map of accented characters to their corresponding Alt+letter combinations | ||
| // These are sent by iTerm2/VSCode terminals when pressing Alt+letter, but with meta:false | ||
| const ACCENTED_CHAR_TO_LETTER: Record<string, string> = { | ||
| å: 'a', // Alt+A |
There was a problem hiding this comment.
remove these comments. and rename this to alt or meta key map rather than accented char to letter. That way the name describes what this is not what it looks like.
jacob314
left a comment
There was a problem hiding this comment.
Approved after this last minor nit is addressed.
…ose as a mapping of Alt key characters.
| π: 'p', | ||
| œ: 'q', | ||
| '®': 'r', | ||
| ß: 's', |
There was a problem hiding this comment.
why aren't some of these chars in quotes?
There was a problem hiding this comment.
prettier seems to be removing the single code for some unicode characters so using Unicode escape codes

Enhanced keyboard input processing to support:
Added comprehensive test coverage for all new keyboard input scenarios
fixes: #10753
TLDR
Dive Deeper
Reviewer Test Plan
Testing Matrix
Linked issues / bugs