Expose input-box line-editing actions (deleteToLineStart/deleteWord) as bindable keybindings; add default Cmd+Backspace = delete-to-line-start

Resolved 💬 2 comments Opened Jun 6, 2026 by Shahfarzane Closed Jun 9, 2026

Updated after reading the official keybindings docs (https://code.claude.com/docs/en/keybindings) — reframing this issue to be accurate and actionable. Original report below the line.

Summary

macOS-style Cmd+Backspace = delete to start of line (and Cmd/Option line/word editing generally) does not work in the input box, and there is no way to configure it, because the text line-editing operations are not exposed as bindable actions.

This is not a problem with the keyboard-enhancement protocol. The docs make clear that enabling the Kitty keyboard protocol / xterm modifyOtherKeys is intentional and is precisely what makes the cmd modifier detectable:

The cmd group is only detected in terminals that report the Super modifier, such as those supporting the Kitty keyboard protocol or xterm's modifyOtherKeys mode.

And default cmd bindings already exist (Cmd+Kchat:clearScreen, Cmd+Cselection:copy). So cmd+backspace can be detected. The actual gap is that there is no delete-line/delete-word action to bind it to.

The gap

The Chat context exposes only component-level actions: cancel, clearInput, clearScreen, killAgents, cycleMode, modelPicker, fastMode, thinkingToggle, submit, newline, undo, externalEditor, stash, imagePaste.

None of the input-box line-editing operations are bindable:

  • delete to line start (currently hardcoded to Ctrl+U)
  • delete to line end (Ctrl+K)
  • delete word backward (Ctrl+W / Option+Backspace)
  • delete word forward
  • (cursor word/line motions, etc.)

The docs confirm these live at the "text input level" (same layer as vim mode), separate from the keybindings system, so keybindings.json cannot touch them. Net result: there is no configuration that makes Cmd+Backspace delete to line start.

Requests (any one resolves it)

  1. Expose input-editor actions as bindable Chat-context keybindings, e.g. chat:deleteToLineStart, chat:deleteToLineEnd, chat:deleteWordLeft, chat:deleteWordRight (plus the matching cursor motions). This lets users map cmd+backspace, etc., themselves.
  2. Add default macOS bindings when the Super modifier is available: cmd+backspace → deleteToLineStart, cmd+delete → deleteToLineEnd, matching standard macOS text-field behavior (and alt+backspace → deleteWordLeft).

Workaround today

Ctrl+U (delete to line start), Ctrl+W (delete previous word), Ctrl+K (delete to end of line).

Environment

  • Claude Code: 2.1.167
  • OS: macOS (Apple Silicon)
  • Terminals: reproduces on all terminals where cmd is detected via the protocol (Warp, iTerm2, Ghostty, kitty, WezTerm). macOS Terminal.app does not report Super, so cmd bindings don't apply there at all.

---

Original report

A few releases ago, the input box stopped honoring Cmd+Backspace = delete to start of line. From inspecting the bundled CLI, Claude Code enables the kitty keyboard protocol (ESC[>1u) and xterm modifyOtherKeys (ESC[>4;2m) for a hardcoded terminal allowlist (iTerm.app, kitty, WezTerm, ghostty, tmux, windows-terminal, WarpTerminal). With the protocol active, the terminal forwards Cmd+Backspace to the app instead of translating it to Ctrl+U, and the input box has no binding for it — its only delete-to-line-start is Ctrl+U, while meta+Backspace maps to delete-word. (See the updated summary above for the accurate framing: the protocol is intended; the real gap is the unbindable line-editing actions.)

View original on GitHub ↗

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