claude-code - 💡(How to fix) Fix Ctrl+U in Chat input cannot be unbound via keybindings.json (v2.1.112) [2 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#49678Fetched 2026-04-17 08:34:25
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1cross-referenced ×1

In v2.1.111+, Ctrl+U in the Chat input clears the entire input buffer. This behavior appears to be hardcoded and cannot be disabled via ~/.claude/keybindings.json.

Root Cause

In v2.1.111+, Ctrl+U in the Chat input clears the entire input buffer. This behavior appears to be hardcoded and cannot be disabled via ~/.claude/keybindings.json.

Code Example

{
     "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
     "bindings": [
       { "context": "Chat", "bindings": { "ctrl+u": null } }
     ]
   }
RAW_BUFFERClick to expand / collapse

Summary

In v2.1.111+, Ctrl+U in the Chat input clears the entire input buffer. This behavior appears to be hardcoded and cannot be disabled via ~/.claude/keybindings.json.

Version

claude --version: 2.1.112 (Claude Code)

Reproduction

  1. Create ~/.claude/keybindings.json:
    {
      "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
      "bindings": [
        { "context": "Chat", "bindings": { "ctrl+u": null } }
      ]
    }
  2. Run /doctor — no keybinding errors reported.
  3. Restart Claude Code.
  4. Type some text in the chat input and press Ctrl+U.

Expected

Ctrl+U is unbound and does nothing (or at least is user-configurable).

Actual

Ctrl+U still clears the entire input buffer.

Notes

The Chat actions table in https://code.claude.com/docs/en/keybindings does not list Ctrl+U as the default binding for any named action, which suggests the new clear-buffer behavior is hardcoded outside the keybindings system. Exposing it as a named action (e.g. chat:clearAll or similar) would let users unbind or rebind it.

extent analysis

TL;DR

The issue can be potentially resolved by exposing the Ctrl+U behavior as a named action in the keybindings system, allowing users to unbind or rebind it.

Guidance

  • The hardcoded behavior of Ctrl+U clearing the input buffer suggests that it is not currently configurable via the ~/.claude/keybindings.json file.
  • To verify the issue, follow the reproduction steps provided, which include creating a custom keybindings file and testing the Ctrl+U behavior in the Chat input.
  • A potential workaround could involve modifying the Claude Code source code to expose the Ctrl+U behavior as a named action, such as chat:clearAll, which would allow users to customize the binding.
  • The Chat actions table in the Claude Code documentation does not list Ctrl+U as a default binding, which supports the theory that the behavior is hardcoded outside the keybindings system.

Example

No code snippet is provided, as the issue does not imply a specific code solution.

Notes

The solution to this issue may require modifications to the Claude Code source code, which could be complex and may not be feasible for all users. Additionally, the issue may be specific to version 2.1.112 and may not affect other versions of Claude Code.

Recommendation

Apply workaround: Expose the Ctrl+U behavior as a named action in the keybindings system, allowing users to unbind or rebind it, as this would provide a more flexible and user-configurable solution.

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