Skip to content

fix(cli): handle Kitty keyboard protocol Shift+Enter for Ghostty/WezTerm#2345

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-40b195db
Mar 21, 2026
Merged

fix(cli): handle Kitty keyboard protocol Shift+Enter for Ghostty/WezTerm#2345
teknium1 merged 1 commit intomainfrom
hermes/hermes-40b195db

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Salvage of PR #1798 by @ygd58cli.py keybinding only, registry.py apostrophe sanitization excluded as unrelated.

Kitty-protocol terminals (Ghostty, WezTerm) encode Shift+Enter as CSI 13;2u instead of plain Enter. Without this binding, raw [13;2u text appears in the input buffer. Adds s-enter and the Kitty escape sequence as newline-insert bindings.

Harmless in regular terminals — these bindings only fire if the terminal sends the specific sequences. Fixes #1795.

Kitty-protocol terminals (Ghostty, WezTerm) encode Shift+Enter as
CSI 13;2u instead of plain Enter. Without this binding, raw escape
characters appear in the input buffer. Adds s-enter and the Kitty
escape sequence as newline-insert bindings.

Based on work by ygd58 in PR #1798. Fixes #1795.
Registry.py apostrophe sanitization change excluded (unrelated scope).
@teknium1 teknium1 merged commit 3a71099 into main Mar 21, 2026
1 check failed
teknium1 added a commit that referenced this pull request Mar 21, 2026
Reverts the s-enter and Kitty CSI keybindings from PR #2345/#2346.
The s-enter key notation causes 'Invalid key: s-enter' crash on
some prompt_toolkit versions, breaking hermes startup entirely.
outsourc-e pushed a commit to outsourc-e/hermes-agent that referenced this pull request Mar 26, 2026
Reverts the s-enter and Kitty CSI keybindings from PR NousResearch#2345/NousResearch#2346.
The s-enter key notation causes 'Invalid key: s-enter' crash on
some prompt_toolkit versions, breaking hermes startup entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants