claude-code - 💡(How to fix) Fix [BUG] keybindings.json presence causes input to not clear after submit; keybinding actions ignored [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48023Fetched 2026-04-15 06:35:33
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
0
Timeline (top)
labeled ×5cross-referenced ×2commented ×1unlabeled ×1

Error Message

Error Messages/Logs

Code Example



---

{
    "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
    "bindings": [
      {
        "context": "Chat",
        "bindings": {
          "enter": "chat:newline",
          "cmd+enter": "chat:submit",
          "meta+enter": "chat:submit"
        }
      }
    ]
  }
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When a ~/.claude/keybindings.json file is present, two bugs occur:

  1. The input field is not cleared after submitting a message — the text remains visible and accumulates into subsequent messages
  2. Custom keybinding actions (e.g. chat:newline, chat:submit) are ignored entirely; Enter always submits regardless of configuration

What Should Happen?

  • Input should clear after submission
  • enter: "chat:newline" should insert a newline instead of submitting
  • cmd+enter: "chat:submit" should submit the message

Error Messages/Logs

Steps to Reproduce

  1. Create ~/.claude/keybindings.json with this content:
{
  "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "enter": "chat:newline",
        "cmd+enter": "chat:submit",
        "meta+enter": "chat:submit"
      }
    }
  ]
}
  1. Start Claude Code
  2. Type a message and press Enter — it submits (should add newline)
  3. Type another message and submit — the previous message text is still present in the input

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.89

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • Removing keybindings.json completely restores normal behavior (input clears after submit)
  • Tested with both /opt/[redacted]/bin/claude and /opt/homebrew/bin/claude — same result
  • Tested with 3 different terminal applications — same result
  • Tested with a clean environment (env -i) — same result
  • The bug is triggered by the mere presence of the file, regardless of content

also, the desciption of this issue is claude-generated based on the result of the trouble-shooting session

extent analysis

TL;DR

The presence of a ~/.claude/keybindings.json file causes the input field not to clear after submitting a message and ignores custom keybinding actions.

Guidance

  • Verify that the issue is resolved by removing the ~/.claude/keybindings.json file, as mentioned in the "Additional Information" section.
  • Check the keybindings.json file for any syntax errors or invalid configurations that might be causing the issue.
  • Test with a minimal keybindings.json file to isolate the problem, for example:
{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "enter": "chat:newline"
      }
    }
  ]
}
  • If the issue persists, try resetting the keybindings to their default state or seeking further assistance from the Claude Code community or support team.

Notes

The issue seems to be triggered by the mere presence of the keybindings.json file, regardless of its content, which suggests a potential bug in the Claude Code configuration parsing or keybinding handling logic.

Recommendation

Apply a workaround by removing or renaming the ~/.claude/keybindings.json file until a fix is available, as this resolves the issue according to the "Additional Information" section.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING