[FEATURE] Ctrl-C and Esc keys should be single-purposed not multi-purposed

Resolved 💬 15 comments Opened Sep 10, 2025 by dimension-zero Closed Feb 28, 2026

Preflight Checklist

Problem Statement

Current key bindings suffer from overloaded functionality that creates usability issues:

Ctrl-C conflicts:

  • Single press: clears prompt box
  • Double press: exits Claude Code entirely
  • Lack of clear feedback increases risk of accidental exit

Esc key conflicts:

  • Single press: interrupts Claude Code execution
  • Double press: shows prompt history
  • Also exits interactive menus

These multi-function bindings lead to confusion and unintended actions, particularly on slower systems where key presses may be delayed or buffered.

Proposed Solution

Implement single-purpose key bindings:

  • Ctrl-Q → quit Claude Code
  • Ctrl-C → clear prompt box only
  • Ctrl-Up-Arrow → show prompt history
  • Ctrl-X / Ctrl-Down-Arrow → exit interactive menus
  • Esc → interrupt Claude Code execution only

Benefits

Single-purpose key bindings provide:

  • Clear separation of functions
  • Elimination of accidental actions
  • Improved user experience through predictable behavior
  • Reduced cognitive load when remembering shortcuts

Use Case Examples

Current problematic scenarios:

  1. Sluggish system + Ctrl-C: User presses Ctrl-C to clear prompt, sees no response, presses again. Minutes later, both keypresses register and Claude Code exits unexpectedly.
  1. Esc key confusion: User presses Esc twice to review prompts, but inadvertently stops current execution instead.
  1. Menu exit delays: User presses Esc to exit menu, sees no response due to system lag, presses again. Both keypresses eventually register, causing menu exit plus unwanted task interruption.

Alternative Solutions

  • Allow user-configurable key bindings
  • Community input on preferred key combinations
  • Implement confirmation dialogs for destructive actions

Priority

High - Significant impact on productivity and user experience

Feature Category

Interactive mode (TUI)

Additional Context

This represents a straightforward UX improvement that can be implemented without significant complexity while addressing fundamental usability concerns.

View original on GitHub ↗

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