Rebinding chat:submit to shift+enter does not clear input buffer after send
Resolved 💬 3 comments Opened Mar 27, 2026 by jeffrey-aguilera Closed Mar 31, 2026
Description
Rebinding chat:submit from enter to shift+enter (and enter to chat:newline) causes the input buffer to not clear after a message is submitted. The message is sent successfully, but the text remains in the input field.
Steps to Reproduce
- Create
~/.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",
"shift+enter": "chat:submit"
}
}
]
}
- Restart Claude Code
- Type a message and press Shift+Enter to submit
Expected Behavior
Message is sent and the input buffer is cleared.
Actual Behavior
Message is sent but the input buffer retains the submitted text.
Motivation
Many users prefer Enter for newlines (the common case — multiple per message) and Shift+Enter or Cmd+Enter for submit (the rare case — once per message). This is the convention in Slack, Discord, and many other chat tools. The keybindings feature exists to support this, but the buffer bug makes it unusable.
Environment
- macOS (Darwin 25.3.0)
- Claude Code CLI
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗