shift+enter keybinding for chat:newline not recognized on Windows Terminal
Bug Report
Platform: Windows 11 Enterprise
Terminal: Windows Terminal
Claude Code version: latest
Description
The shift+enter keybinding configured for chat:newline does not work in Claude Code when running inside Windows Terminal. The keypress appears to be ignored — Shift+Enter either does nothing or submits the message instead of inserting a newline.
Steps to Reproduce
- On Windows, open Windows Terminal
- Configure
~/.claude/keybindings.json:
``json``
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"shift+enter": "chat:newline"
}
}
]
}
- Start Claude Code
- Press Shift+Enter in the chat input
Expected Behavior
A newline is inserted into the chat input (same as ctrl+j).
Actual Behavior
The keypress is not handled — no newline is inserted.
Additional Context
- Windows Terminal does forward Shift+Enter as a distinct keystroke to other terminal applications (confirmed by testing in other TUI apps in the same terminal session)
- The built-in
ctrl+jbinding forchat:newlineworks correctly - The
/terminal-setupslash command incorrectly reports "Shift+Enter is natively supported in Windows Terminal. No configuration needed." — this is misleading since the issue is on Claude Code's side, not the terminal's
The bug appears to be that Claude Code does not correctly parse or handle the escape sequence that Windows Terminal sends for Shift+Enter.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Confirming this on Windows 11 (build 26200, version 25H2) + Windows Terminal 1.24.11911.0 + PowerShell 7.
/terminal-setup says Shift+Enter should work, but it still submits instead of adding a newline.
I tried @deganii's Windows Terminal workaround (remapping Shift+Enter to send a newline directly). It does fix Claude
Code, but since that remap applies to the whole terminal, it also broke Shift+Enter in PowerShell: instead of
inserting a new line at the cursor, PSReadLine inserted it above the current line. Had to undo the workaround because
of that.
Using Ctrl+J or Ctrl+Enter for now, but would be great to see this fixed properly so Shift+Enter works without side
effects elsewhere.
Install 'Windows Terminal Preview' to temporarily solved this issue, or wait for 1.25 to be released; Of course, this is definitely a bug of
/terminal-setupThis looks like a duplicate of #77311, which covers the same failure with the root cause
already narrowed down.
Short version of why the keybinding can't work: Windows Terminal sends a bare
CRforboth Enter and Shift+Enter, and Claude Code never asks it for anything better — it emits
no win32-input-mode enable (
ESC[?9001h) and no kitty keyboard push (CSI > <flags> u).The Shift state is discarded before the app sees it, so no
keybindings.jsonentry canmatch. Confirmed still true in v2.1.224.
On the
/terminal-setupmisreport you flagged: the cause is thatwindows-terminalislisted in the table of terminals assumed to emit CSI-u natively, alongside
Ghostty/Kitty/iTerm2/WezTerm/Warp. That makes
supportsShiftEnter()return true, so thecommand short-circuits to "no configuration needed" and the UI advertises
shift+enteras the newline hint. Details and the rest of the analysis are in
https://github.com/anthropics/claude-code/issues/77311#issuecomment-5262130898.
Re the WT Preview 1.25 suggestion above: I don't think a terminal upgrade fixes this by
itself. The kitty keyboard protocol is opt-in and v2.1.224 never pushes flags, so the
bytes arriving on stdin shouldn't change. If it does work for you on 1.25, could you say
which Claude Code version you were on? That would mean an enable exists somewhere I
couldn't find.
Suggest consolidating on #77311.