Skip to content

feat: add generic modifier support via CSI u escape sequences#577

Open
menny wants to merge 1 commit intobutlerx:mainfrom
menny:generic-modifier-support
Open

feat: add generic modifier support via CSI u escape sequences#577
menny wants to merge 1 commit intobutlerx:mainfrom
menny:generic-modifier-support

Conversation

@menny
Copy link
Copy Markdown

@menny menny commented Feb 18, 2026

This PR adds support for modified special keys (Shift, Ctrl, Alt, Meta) by implementing the standard CSI u (Unicode keyboard input) protocol.

Specifically, it handles:

  • Shift+Enter (e.g. for newlines without submission in modern TUIs like gemini-cli)
  • Modified Tab, Backspace, and Escape.

The implementation hooks into attachCustomKeyEventHandler to intercept raw keyboard events and map them to standard escape sequences (e.g. \x1b[13;2u for Shift+Enter).

Includes unit tests for the modifier mapping logic.

@menny
Copy link
Copy Markdown
Author

menny commented Feb 18, 2026

This is useful for me as some of the CLIs I use over ssh have special handling for SHIFT + ENTER.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants