fix(cli): handle DECKPAM keypad Enter sequences in terminal#1
fix(cli): handle DECKPAM keypad Enter sequences in terminal#1Gitanaskhan26 merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for the DECKPAM (application keypad) keypad Enter escape sequence so the CLI correctly maps previously-unhandled terminal input to the enter key event.
Changes:
- Map SS3
OM(i.e.,ESC O M) to{ name: 'enter' }in the key sequence decoder.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| string, | ||
| { name: string; shift?: boolean; ctrl?: boolean } | ||
| > = { | ||
| OM: { name: 'enter' }, |
There was a problem hiding this comment.
Add a unit test for the newly supported DECKPAM keypad Enter sequence (SS3 ESC O M / \x1bOM) to ensure it is parsed as { name: 'enter' } and stays supported across refactors. There are already KeypressContext tests covering Kitty enter sequences, but none for SS3 OM.
| string, | ||
| { name: string; shift?: boolean; ctrl?: boolean } | ||
| > = { | ||
| OM: { name: 'enter' }, |
There was a problem hiding this comment.
For consistency/readability, consider placing the OM (SS3) mapping alongside the other O* SS3 mappings (OA/OB/OC/OD/OP וכו.) instead of at the top of KEY_INFO_MAP. Keeping related escape sequences grouped makes future maintenance less error-prone.
Summary
Add DECKPAM support for keypad Enter in terminal mode to resolve unmapped sequence outputs. This matches the missing
OMsequence to the 'enter' key mapping.Related Issues
Fixes google-gemini#22671
Pre-Merge Checklist