Enter keybinding override to chat:newline still triggers chat:submit simultaneously

Resolved 💬 2 comments Opened Mar 5, 2026 by mixram Closed Mar 5, 2026

Description

When overriding enter to chat:newline in ~/.claude/keybindings.json, pressing Enter both inserts a newline and submits the text from the current line. The expected behavior is that Enter should only insert a newline (no submission).

Steps to Reproduce

  1. Edit ~/.claude/keybindings.json and set the Chat context bindings to:

``json
{
"context": "Chat",
"bindings": {
"enter": "chat:newline",
"meta+enter": "chat:submit"
}
}
``

  1. Launch Claude Code
  2. Type some text (e.g., "hello")
  3. Press Enter

Expected Behavior

A newline is inserted after "hello". No message is submitted.

Actual Behavior

A newline is inserted, but "hello" is also submitted as a message simultaneously. The user sees an interrupted/partial response to "hello" and the cursor on a new line.

Environment

  • Claude Code version: v2.1.69
  • Model: Opus 4.6
  • OS: macOS (Darwin 25.3.0)
  • Shell: zsh

Workaround

Revert to default keybindings (enterchat:submit, shift+enterchat:newline).

View original on GitHub ↗

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