[FEATURE] Make double Ctrl+L /clear behavior separately disablable
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+ltonullinkeybindings.jsondisables both single and double press - Explicitly rebinding
ctrl+ltochat:clearInputstill triggers/clearon double press - Rebinding to
chat:canceldoesn't work either - There is no separate command name for the double-press
/clearbehavior
Related issues: #45878, #34087, #39975, #37451
Proposed Solution
Make the double-press /clear behavior separately configurable. Options:
- Add a distinct keybinding command (e.g.,
chat:clearConversation) for the double-press action, so users can set it tonullindependently - Add a setting to disable the double-press shortcut entirely (e.g.,
"disableDoublePressShortcuts": true) - Remove the double-press behavior entirely —
/clearis already available as a typed command and viaCmd+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.
3 Comments
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.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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.