[BUG] Remapping 'enter' → 'chat:newline' in keybindings.json doesn't suppress default submit; newline persists into next prompt's input buffer
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?
After keybinding that binds Enter to newline is added, pressing Enter in the input field still triggers 'send' of the input content with newline added. The content (with newline added) remains in the input field (the field does not get cleared as happens without the altered keybinding after 'enter' is pressed).
keybindings.json:
{ "bindings": [{ "context": "Chat", "bindings": { "enter": "chat:newline", "ctrl+j": "chat:submit" } }]
What Should Happen?
Enter inserts newline only; Ctrl+J submits
Error Messages/Logs
Steps to Reproduce
- Create a key bindings file (~/.claude/keybindings.json) with content:
{ "bindings": [{ "context": "Chat", "bindings": { "enter": "chat:newline", "ctrl+j": "chat:submit" } }]
- start claude
- write any prompt and hit 'Enter' key
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.85
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗