Keybinding: cannot override default 'enter → chat:submit' with user bindings
Resolved 💬 5 comments Opened May 18, 2026 by bill456 Closed May 27, 2026
Summary
User keybindings cannot override the default enter → chat:submit binding. When a user adds \"enter\": \"chat:newline\" to their ~/.claude/keybindings.json, Enter still submits the chat instead of inserting a newline.
Expected behaviour
Per the keybindings documentation, user bindings should be able to rebind enter to chat:newline, making Enter insert a newline and a separate key (e.g. ctrl+enter or alt+enter) submit the message.
Actual behaviour
Enter continues to submit regardless of what is set in keybindings.json. The default enter → chat:submit binding always takes precedence.
Reproduction steps
- Add the following to
~/.claude/keybindings.json:
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"enter": "chat:newline",
"ctrl+enter": "chat:submit"
}
}
]
}
- Restart Claude Code desktop app
- Press Enter in the chat input
Result: Message is submitted
Expected: A newline is inserted
Additional context
- Also attempted: splitting into two context blocks (first block
enter: nullto unbind default, second blockenter: "chat:newline"to rebind) — Enter still submits - Also attempted:
alt+enterfor submit — Enter still submits regardless of submit key - The docs state user bindings are "additive" and "appended after defaults" — this appears to mean defaults always win when the same key is used, with no way for users to override them
- Platform: Windows, Claude Code desktop app v2.1.132
Suggested fix
Either:
- Allow user bindings to override defaults when the same key is specified (last-binding-wins), or
- Document that
entercannot be rebound and suggestctrl+j(the default newline key) as the alternative
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗