You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shift+Enter intercepted, not forwarded to PTY (breaks Kitty keyboard protocol) #2970
Shift+Enter is intercepted and not forwarded to the PTY
Summary
Superset's terminal intercepts Shift+Enter via attachCustomKeyEventHandler and prevents it from reaching the PTY. This breaks terminal applications that rely on the Kitty keyboard protocol to distinguish Shift+Enter from plain Enter — notably pi, Claude Code, and other CLI tools that use Shift+Enter for multi-line input.
Expected behavior
When a terminal application has enabled the Kitty keyboard protocol (via CSI > 1 u), Shift+Enter should be forwarded to the PTY as the CSI u sequence \x1b[13;2u, allowing the application to distinguish it from plain Enter.
Actual behavior
Shift+Enter is unconditionally swallowed by Superset's custom key event handler:
// helpers.ts ~line 536constisShiftEnter=event.key==="Enter"&&event.shiftKey&&!event.metaKey&&!event.ctrlKey&&!event.altKey;if(isShiftEnter){if(event.type==="keydown"&&options.onShiftEnter){event.preventDefault();options.onShiftEnter();}returnfalse;// ← prevents xterm.js from sending anything to the PTY}
The return false prevents xterm.js from processing the key, so the Kitty protocol response is never generated regardless of whether the application requested it.
Affected applications
pi — uses Shift+Enter for new line in its TUI editor
Claude Code — uses Shift+Enter for multi-line input
Any terminal application using the Kitty keyboard protocol
Suggested fix
Check whether the Kitty keyboard protocol is active before intercepting. xterm.js tracks this internally. When the protocol is enabled, Shift+Enter should pass through to the PTY so xterm.js can encode it as \x1b[13;2u.
A simpler alternative: add a per-terminal or global setting to disable the Shift+Enter interception, e.g.:
I run pi inside Superset as my daily driver. Shift+Enter is the default keybinding for inserting a new line in your TUI editor (tui.input.newLine), and since Superset intercepts it before it reaches the PTY, multi-line input is completely broken (every Shift+Enter submits the message instead).
I have confirmed that pi requests the Kitty keyboard protocol on startup via CSI > 1 u, so the approach in #2971 (checking kittyKeyboard.flags before intercepting) would fix this for my workflow.
Would love to see #2971 merged — happy to test a build if that would help move it forward.
Closing as a duplicate of #5604, the consolidated tracker for stale terminal-input issues from the July 2026 stale-issue sweep (no activity since 2026-06-01). If this still applies on a current build, comment on #5604 and we'll reopen.
Activity
fix: solve #2970 — pass Shift+Enter through to PTY when Kitty keyboar…
sarthaksrinivas commentedon Apr 6, 2026
I run pi inside Superset as my daily driver.
Shift+Enteris the default keybinding for inserting a new line in your TUI editor (tui.input.newLine), and since Superset intercepts it before it reaches the PTY, multi-line input is completely broken (every Shift+Enter submits the message instead).I have confirmed that pi requests the Kitty keyboard protocol on startup via
CSI > 1 u, so the approach in #2971 (checkingkittyKeyboard.flagsbefore intercepting) would fix this for my workflow.Would love to see #2971 merged — happy to test a build if that would help move it forward.
sarthaksrinivas commentedon Apr 8, 2026
#3251
@marvtub does this solve your issue?
Kitenite commentedon May 6, 2026
Related reports (cross-referenced during issue triage — same area, may or may not share a root cause):
Kitenite commentedon Jul 11, 2026
Closing as a duplicate of #5604, the consolidated tracker for stale
terminal-inputissues from the July 2026 stale-issue sweep (no activity since 2026-06-01). If this still applies on a current build, comment on #5604 and we'll reopen.