[BUG] keybindings.json ignored in Claude desktop app — Enter/Shift+Enter always submit
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The ~/.claude/keybindings.json configuration file is completely ignored when running Claude Code through the Claude desktop app on macOS.
Both Enter and Shift+Enter submit the message, regardless of the keybindings config. The config sets "enter": null to unbind Enter from submit and "ctrl+enter": "chat:submit" to use Ctrl+Enter instead, but this has no effect.
The file is valid JSON, correct encoding, located at the correct path (~/.claude/keybindings.json), and verified with python3 -c "import json; json.load(open(...))".
keybindings.json contents:
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"enter": null,
"ctrl+enter": "chat:submit"
}
}
]
}
What Should Happen?
- Enter should insert a newline (unbound from submit via
"enter": null) - Ctrl+Enter should submit the message (bound via
"ctrl+enter": "chat:submit") - Shift+Enter should insert a newline
- The
~/.claude/keybindings.jsonconfig should be respected in the Claude desktop app, just as it is in the CLI
Error Messages/Logs
Steps to Reproduce
- Create
~/.claude/keybindings.jsonwith the following content:
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"enter": null,
"ctrl+enter": "chat:submit"
}
}
]
}
- Open Claude Code in the Claude desktop app (not terminal or VS Code)
- Type a message in the chat input
- Press Enter — it submits the message instead of inserting a newline
- Press Shift+Enter — it also submits the message instead of inserting a newline
- The keybindings.json config appears to be completely ignored
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.39 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Terminal/Shell note: Running Claude Code inside the Claude desktop app on macOS (not a standalone terminal). The desktop app is not listed in the Terminal/Shell dropdown, so "Other" was selected.
This issue may be that the Claude desktop app simply does not read ~/.claude/keybindings.json at all. Either the desktop app should respect the keybindings config, or there should be a separate keybinding setting within the desktop app itself.
OS: macOS (Darwin 25.3.0)
Showing cached comments. Read the full discussion on GitHub ↗
16 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Of the various duplicates, which will be kept as the active issue? So I can 👍 it.
Yes, not working on Windows 11 either.
Feature Request: Default keybinding for newline in chat input
Summary
There is no default keybinding to insert a newline in the chat input. This makes composing multi-line prompts unnecessarily difficult, and multi-line prompts are important for writing clear, structured instructions.
Current behavior
entersubmits the message (the only default chat input binding)chat:newlinehas no default keybindingshift+enterdoes not work because most terminal emulators send the same keycode forshift+enterandenter— they are indistinguishableWorkarounds that exist today
ctrl+gto open an external editor — works, but can conflict with other apps (e.g., Gemini usesctrl+gglobally on macOS)\continuation before pressing enter — works, but not intuitiveSuggestion
Assign a default keybinding to
chat:newlinethat actually works in terminals.alt+enter(oroption+enteron macOS) is distinguishable fromenterin most terminal emulators and is a common newline convention in other tools (Slack, JetBrains IDEs, etc.).Why this matters
Good prompts are often multi-line — numbered instructions, code blocks, structured context. Making newline entry frictionless would improve the experience for everyone using Claude Code in the terminal.
Environment
Also reproducible on Windows Terminal + CLI
Same issue here —
keybindings.jsonis completely ignored.Environment
keybindings.json (
~/.claude/keybindings.json)Actual behavior
The config is valid JSON, UTF-8 without BOM, at the correct path. Restarting Claude Code does not help. This confirms the issue is not limited to the desktop app — it also affects the CLI on Windows Terminal.
FWIW, I'm actually finding that
\[ENTER](backslash then[ENTER]) is _easier_ to type than[SHIFT]+[ENTER]...@jhardin-accumula Nice tip! I confirmed
\[ENTER]works as a newline workaround — but only when the IME (Input Method Editor) is off.When Japanese IME is active, the backslash key produces
¥instead of\, so the shortcut doesn't register. This likely affects all CJK IME users (Japanese, Chinese, Korean).Environment: Windows 11 + Git Bash, Claude Code CLI
Small addition: my IME is Google Japanese Input (Google 日本語入力), not the default Microsoft IME.
+1 for this. In Claude Code GUI, too often I'm not getting my left pinky on the shift key before I hit the enter key -- and thus Claude starts thinking.
I'd rather configure it so the enter key is a simple newline -- and ctrl-enter / command-enter / alt-enter is submit
+1.
a Claude suggestion:
+1
OpenAI Codex already does this.
+1
It works in the CLI Claude Code, but not in Windows desktop app.
This is extremely annoying. Most coding prompts are multi-line, at least during planning.
Here's a workaround for Windows users with AutoHotKey:
macOS data point: Same behavior on the macOS Desktop app.
~/.claude/keybindings.jsonwithworks as documented in the terminal TUI but is completely ignored in Desktop — Enter always submits.
Use case: answering multi-line prompts with multi-line responses without accidentally sending incomplete messages.
Even if full keybindings.json support in Desktop is a bigger lift, this could be as simple as a checkbox in Preferences or a small toggle beneath the entry field ("Enter inserts newline / Shift+Enter sends"). That would cover the most-requested case here and would also resolve #2054 for Desktop users.
macOS data point: Same behavior on the macOS Desktop app.
~/.claude/keybindings.jsonwithworks as documented in the terminal TUI but is completely ignored in Desktop — Enter always submits.
Use case: answering multi-line prompts with multi-line responses without accidentally sending an incomplete message. Even if full keybindings.json support in Desktop is a bigger lift, a simple toggle — a checkbox in Preferences, or a small popup/selector beneath the entry field — for "Enter inserts newline / Shift+Enter sends" would cover the most-requested case, and would also resolve #2054 for Desktop users.
We are all after the same thing here — Enter for a newline, a modifier for submit.
At least for Enter, I don't think
keybindings.jsoncan get us there on Desktop: the composer handles that key itself, and decides what it does from whether the machine has a touchscreen.Two machines, same account, same version (
1.24012.9), both MSIX.On a ThinkPad with no touchscreen, Enter submits — with several forms of
keybindings.json, and also with the file deleted entirely.On a Surface Pro, Enter inserts a newline with no
keybindings.jsonpresent at all.matchMedia('(pointer: coarse)').matchesin DevTools tells you which side you are on.This may also be what is behind #77723 and #79696, where people report the opposite problem.
What I ended up doing: I write in Japanese, so the AutoHotkey remap above does not work for me — with a Japanese IME, Enter is also what commits the kana-to-kanji conversion, so remapping it means the conversion can never be committed.
Instead of touching the key I force the pointer type at launch, which leaves key handling alone:
Enter = newline, Ctrl+Enter = submit, IME still fine. No admin needed, and resolving the path this way survives app updates.
This is only a workaround on my machine, though. Desktop should honour
keybindings.jsonthe same way the terminal does — or at the very least expose this as a setting, instead of deciding it from the hardware.