claude-code - 💡(How to fix) Fix cmd+backspace in multi-line chat input deletes all lines instead of current line [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49672Fetched 2026-04-17 08:34:35
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

When the chat input contains multiple lines, pressing cmd+backspace deletes the entire input (all lines) instead of only the current line, which is the standard macOS behavior in virtually every other text input.

Root Cause

When the chat input contains multiple lines, pressing cmd+backspace deletes the entire input (all lines) instead of only the current line, which is the standard macOS behavior in virtually every other text input.

Fix Action

Workaround

None via keybindings — the available chat actions only include chat:clearInput (full clear), with no line-level delete primitive to remap.

RAW_BUFFERClick to expand / collapse

Description

When the chat input contains multiple lines, pressing cmd+backspace deletes the entire input (all lines) instead of only the current line, which is the standard macOS behavior in virtually every other text input.

Expected behavior

cmd+backspace should delete only the current line (from cursor to start of line), matching native macOS text editing conventions.

Actual behavior

cmd+backspace clears the entire multi-line input, wiping work from other lines.

Steps to reproduce

  1. Open Claude Code in a macOS terminal
  2. In the chat input, type several lines (use ctrl+j for newlines)
  3. Place cursor on one of the lines
  4. Press cmd+backspace
  5. Observe that all lines are deleted, not just the current one

Workaround

None via keybindings — the available chat actions only include chat:clearInput (full clear), with no line-level delete primitive to remap.

Environment

  • macOS (Darwin 25.2.0)
  • Shell: zsh
  • Claude Code CLI

extent analysis

TL;DR

The issue can be addressed by modifying the keybinding for cmd+backspace to delete only the current line in the chat input.

Guidance

  • Investigate the Claude Code CLI's configuration options to see if there's a way to customize the behavior of cmd+backspace to match native macOS text editing conventions.
  • Check if there are any existing issues or feature requests related to this problem in the Claude Code repository, as it may be a known issue with a planned fix.
  • Consider reaching out to the Claude Code development team to request a new keybinding or primitive that allows for line-level deletion.
  • Review the available chat actions and keybindings to see if there's an alternative way to achieve the desired behavior, such as using a different key combination.

Example

No code snippet is provided as the issue is related to the behavior of a specific application (Claude Code CLI) and its configuration.

Notes

The solution may require changes to the Claude Code CLI's configuration or the addition of new features, which could take time to implement. In the meantime, users may need to use workarounds, such as manually deleting lines or using a different text editor.

Recommendation

Apply workaround: Since there is no clear indication of a fixed version that addresses this issue, and given the lack of a line-level delete primitive, the best course of action is to explore workarounds or request a feature addition from the development team.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

cmd+backspace should delete only the current line (from cursor to start of line), matching native macOS text editing conventions.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix cmd+backspace in multi-line chat input deletes all lines instead of current line [1 comments, 2 participants]