Ctrl+K (clear input) is adjacent to Ctrl+J (newline) — easy to accidentally wipe prompt
Resolved 💬 3 comments Opened May 17, 2026 by ron-wand Closed May 21, 2026
Problem
Ctrl+K clears the current input line, and Ctrl+J submits (newline/enter). These are adjacent keys, making it easy to accidentally clear a long prompt you were composing — with no undo.
Why it matters
- No undo for cleared input
Ctrl+Kis a standard readline binding for "kill to end of line" (not "clear screen"), so the current behavior is also inconsistent with readline expectations- Risk is higher when typing quickly or on keyboards where K and J are close
Suggested fix
Either:
- Remap
Ctrl+Kto its standard readline meaning (kill to end of line, not full clear), or - Add an undo buffer (
Ctrl+ZorCtrl+_) to restore the last cleared input, or - Require a confirmation or a less common key combo for the destructive clear action
Environment
Claude Code CLI
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗