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

Resolved 💬 3 comments Opened May 1, 2026 by wissam-salame-lime 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 ↗

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