Unable to rebind Enter key from chat:submit to chat:newline in keybindings.json

Resolved 💬 4 comments Opened Apr 2, 2026 by Piyons2 Closed May 23, 2026

Bug Description

When setting "enter": "chat:newline" in ~/.claude/keybindings.json, both the default chat:submit AND the new chat:newline action fire simultaneously. This causes the message to be sent, but the text remains in the input field.

Steps to Reproduce

  1. Set the following in ~/.claude/keybindings.json:
{
  "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "enter": "chat:newline",
        "ctrl+n": "chat:submit"
      }
    }
  ]
}
  1. Press Enter in the chat input

Expected Behavior

Enter should insert a newline (chat:newline) and NOT submit the message.

Actual Behavior

Both chat:submit (default) and chat:newline (user binding) fire simultaneously. The message is sent, but the input text remains in the field.

Attempted Workarounds

  • Setting "enter": null in a separate context block before rebinding → does not unbind the default
  • Using two separate Chat context blocks (first with null, second with newline) → same issue

Environment

  • Claude Code version: 2.1.90
  • OS: macOS (Darwin 25.4.0)
  • Terminal: iTerm2

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗