Keybinding override for "enter" does not suppress default "chat:submit" action

Status Closed — not planned
Reported on v2.1.96
Maintainer reply None cached
Activity 5 comments · opened Apr 8, 2026 · closed Apr 20, 2026

Description

When overriding enter to chat:newline in ~/.claude/keybindings.json, the default chat:submit action is not suppressed. Pressing Enter inserts a newline and submits the message simultaneously.

Keybindings Configuration

{
  "$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"
      }
    }
  ]
}

Expected Behavior

  • Enter: inserts a newline only
  • Ctrl+Enter: submits the message

Actual Behavior

  • Enter: inserts a newline and submits the message (both actions fire)
  • Ctrl+Enter: submits the message

Environment

  • Claude Code version: 2.1.96
  • OS: macOS (Darwin 25.3.0)
  • Shell: zsh
  • Terminals tested: Warp, macOS Terminal.app (same behavior on both)

View original on GitHub ↗

5 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/42503
  2. https://github.com/anthropics/claude-code/issues/27222
  3. https://github.com/anthropics/claude-code/issues/44757

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

duane · 6 months ago

I'm very frustrated with this—it's incredibly rare for me (personally) to have any prompt that doesn't have a newline, and I send dozens and dozens of half-baked prompts to claude every time I use it, wasting my money, your computation, and everyone's time. Why is it so hard to disable enter to submit?

Minyus · 5 months ago
junpei · 5 months ago

Thank you, everyone. I have noted that this matter is being discussed in issue#2054. Since I now understand that this is not a bug but rather a situation awaiting the outcome of the ongoing discussion, I will withdraw this request.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.