Shift+Enter is a new line in Claude Code, with no plugin
Explore this workspace.
Technical background
A terminal sends the same key for Enter and Shift+Enter, so Claude Code submitted where a new line was meant, and multi-line prompts needed the tabby-backslash-newline plugin. Torbie now answers the kitty keyboard query Claude Code sends at startup and sends Shift+Enter, Ctrl+Enter and Alt+Enter as their own keys to any app that asked, so Shift+Enter adds a line in Claude Code, and Ctrl+Enter reaches its send-now binding. Shells never ask and still get a plain Enter. If the plugin is installed and bound, it keeps the key and nothing is sent twice. It can be switched off.
The problem
A legacy terminal sends CR for Enter and for Shift+Enter alike, and Claude Code submits on CR. Its /terminal-setup only configures VS Code-like editors, Alacritty, Zed and Apple Terminal, and treats iTerm2, WezTerm, Ghostty, Kitty, Warp and Windows Terminal as supported because they speak the kitty keyboard protocol. xterm.js 6.0, which Torbie renders with, speaks neither that nor xterm's modifyOtherKeys.
How it works
Torbie answers the kitty keyboard query (CSI ? u), tracks the flags an app pushes, pops or sets on each screen, and tracks modifyOtherKeys. Enter with Shift, Ctrl, Alt or Meta then goes out as CSI 13;mods u, or CSI 27;mods;13~ under modifyOtherKeys. On Windows the console layer answers the app's follow-up query itself, before Torbie's answer arrives, so Claude Code never switches the protocol on there. An app that asks at all reads these encodings, so asking is enough: modified Enter is encoded from the query until the app hands the keyboard back on exit.
Shift+Enter, the bytes sent to the session
before after shell, nothing asked \r \r Claude Code running \r ESC[13;2u after Claude Code exits \r \r modifyOtherKeys 2 \r ESC[27;2;13~
Details
- Verified against Claude Code 2.1.283 in a WSL tab of a hidden build: line1, Shift+Enter, line2 left two lines in the prompt and nothing was submitted.
- Plain Enter is always CR, and every other key keeps its usual bytes.
terminal.kittyKeyboard(on), under Settings → Terminal → Keyboard, turns it off.
What this does not claim
- Only Enter is encoded; the rest of the kitty protocol, such as Esc as
CSI 27 uor key-release events, is not implemented. - An app that asks and then exits without resetting the keyboard leaves Shift+Enter encoded until something does; bash then types
;2u.