Repository navigation
fix(terminal): advertise kitty keyboard protocol for Shift+Enter - #1247
Merged
Merged
Conversation
Orca's terminal already encodes Shift+Enter as the kitty CSI-u sequence `\x1b[13;2u`, but without `vtExtensions.kittyKeyboard` xterm.js never answers the `CSI ? u` probe. CLIs that gate enhanced input on that handshake (Claude Code, Codex, etc.) therefore drop the extended bytes and treat Shift+Enter as a plain Enter — most visibly when running inside tmux, which strips extended-key encodings by default. - Enable `vtExtensions.kittyKeyboard` in the default terminal options (matches VS Code's xtermTerminal). - Lock in the flag with a regression test in pane-lifecycle.test.ts. - Add docs/terminal-extended-keys.md explaining the Orca side and the tmux-side `set -s extended-keys on` + `terminal-features xterm*:extkeys` users need for nested Shift+Enter to reach a CLI. Verified end-to-end in Electron: `cat -v` + Shift+Enter now prints `^[[13;2u`, and `printf '\e[?u'` elicits the expected `CSI ? 0 u` reply from xterm.js. Co-authored-by: Orca <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…blyai#1247) Orca's terminal already encodes Shift+Enter as the kitty CSI-u sequence `\x1b[13;2u`, but without `vtExtensions.kittyKeyboard` xterm.js never answers the `CSI ? u` probe. CLIs that gate enhanced input on that handshake (Claude Code, Codex, etc.) therefore drop the extended bytes and treat Shift+Enter as a plain Enter — most visibly when running inside tmux, which strips extended-key encodings by default. - Enable `vtExtensions.kittyKeyboard` in the default terminal options (matches VS Code's xtermTerminal). - Lock in the flag with a regression test in pane-lifecycle.test.ts. - Add docs/terminal-extended-keys.md explaining the Orca side and the tmux-side `set -s extended-keys on` + `terminal-features xterm*:extkeys` users need for nested Shift+Enter to reach a CLI. Verified end-to-end in Electron: `cat -v` + Shift+Enter now prints `^[[13;2u`, and `printf '\e[?u'` elicits the expected `CSI ? 0 u` reply from xterm.js. Co-authored-by: Orca <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vtExtensions.kittyKeyboardon xterm so CLIs that probe withCSI ? ulearn Orca speaks the kitty keyboard protocol and actually consume the CSI‑u bytes Orca already emits for chords like Shift+Enter.xtermTerminal.ts.docs/terminal-extended-keys.mdcovering both the Orca side and the tmux-side config (set -s extended-keys on+terminal-features xterm*:extkeys) users need so Shift+Enter reaches a CLI running inside tmux.pane-lifecycle.test.ts.Why
terminal-shortcut-policy.tsalready writes\x1b[13;2ufor Shift+Enter. Without thekittyKeyboardVT extension, xterm.js never answers the protocol handshake, so apps that gate enhanced input on that response (Claude Code, Codex, and similar) fall back to legacy encodings and treat Shift+Enter as plain Enter. The symptom is most visible inside tmux, which also strips extended-key encodings unless explicitly told to forward them.Test plan
pnpm lintpnpm tc:webpnpm vitest run src/renderer/src/lib/pane-manager src/renderer/src/components/terminal-pane— 24 files, 192 tests passingcat -v, pressed Shift+Enter, verified^[[13;2urendered (caret notation for\x1b[13;2u)printf '\e[?u'in the terminal elicited the expectedCSI ? 0 ureply from xterm.js (confirms the protocol handshake now works)Unrelated: does not modify the headless emulator in
src/main/daemon/headless-emulator.ts; that parser intentionally does not respond to terminal queries (see the existing comment there about OSC 11 double-reply races).Made with Orca 🐋