[FEATURE] Make double Ctrl+L /clear behavior separately disablable

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened May 1, 2026 · closed May 1, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Ctrl+L is bound to chat:clearInput (screen redraw), which is part of a normal terminal workflow — developers use it constantly out of muscle memory. However, pressing Ctrl+L twice within 2 seconds triggers /clear, which destroys the entire conversation context.

This means a destructive, irreversible action is hidden behind a double-press of a routine, non-destructive keybinding. There is no way to disable just the double-press behavior while keeping single Ctrl+L functional:

  • Setting ctrl+l to null in keybindings.json disables both single and double press
  • Explicitly rebinding ctrl+l to chat:clearInput still triggers /clear on double press
  • Rebinding to chat:cancel doesn't work either
  • There is no separate command name for the double-press /clear behavior

Related issues: #45878, #34087, #39975, #37451

Proposed Solution

Make the double-press /clear behavior separately configurable. Options:

  1. Add a distinct keybinding command (e.g., chat:clearConversation) for the double-press action, so users can set it to null independently
  2. Add a setting to disable the double-press shortcut entirely (e.g., "disableDoublePressShortcuts": true)
  3. Remove the double-press behavior entirely — /clear is already available as a typed command and via Cmd+K (chat:clearScreen), so the double-press shortcut is redundant

Alternative Solutions

Users can avoid the problem by never pressing Ctrl+L — but this fights years of terminal muscle memory and is not realistic.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

Developer uses Ctrl+L to redraw the screen (standard terminal habit). Occasionally presses it twice in quick succession — boom, entire conversation context is gone with no undo. This is especially painful in long investigation sessions.

Additional Context

Tested on Claude Code with ~/.claude/keybindings.json — confirmed that overriding ctrl+l in keybindings does not prevent the double-press /clear behavior, indicating it's hardcoded into the chat:clearInput handler.

View original on GitHub ↗

3 Comments

wissam-salame-lime · 5 months ago

Closing — the double-press Ctrl+L → /clear behavior appears to have been removed in a recent version. The docs at https://code.claude.com/docs/en/interactive-mode now describe Ctrl+L as only 'Redraw screen' with no double-press shortcut. The original problem no longer reproduces.

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/45878
  2. https://github.com/anthropics/claude-code/issues/34087
  3. https://github.com/anthropics/claude-code/issues/40907

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

github-actions[bot] · 3 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.