claude-code - 💡(How to fix) Fix [BUG] Ctrl+Backspace doesn't delete word in Claude Code on Windows [2 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#49621Fetched 2026-04-17 08:35:59
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

The escape sequences for these two keys differ, and Claude Code only handles the one that PowerShell doesn't, and vice versa. There's no terminal-level workaround that fixes both without breaking the other.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Problem

On Windows (Windows Terminal + PowerShell), Ctrl+Backspace is the standard shortcut for deleting the previous word — it works correctly in PowerShell and most other apps. Inside Claude Code's chat input, it does nothing.

Alt+Backspace works for word deletion inside Claude Code, but in PowerShell it inserts a garbage character rather than deleting a word. So there's no single key that works in both contexts.

Expected behavior

Ctrl+Backspace deletes the previous word in Claude Code's chat input, consistent with Windows terminal behavior.

Current behavior

  • Ctrl+Backspace in Claude Code: no effect
  • Alt+Backspace in Claude Code: deletes previous word ✓
  • Ctrl+Backspace in PowerShell (outside Claude Code): deletes previous word ✓
  • Alt+Backspace in PowerShell: inserts garbage character

The escape sequences for these two keys differ, and Claude Code only handles the one that PowerShell doesn't, and vice versa. There's no terminal-level workaround that fixes both without breaking the other.

Environment

  • Platform: Windows 11
  • Terminal: Windows Terminal
  • Shell: PowerShell
  • Claude Code: 2.1.112

Related issues

#21092, #34539, #40591, #46087 all track similar issues but are macOS-specific (Option+Backspace). This is the Windows equivalent.

What Should Happen?

Expected behavior

Ctrl+Backspace deletes the previous word in Claude Code's chat input, consistent with Windows terminal behavior.

Error Messages/Logs

Steps to Reproduce

  1. Open Windows Terminal with PowerShell
  2. Launch Claude Code (claude)
  3. Type a multi-word prompt (e.g. hello world)
  4. Press Ctrl+Backspace
  5. Observe that nothing happens — the word is not deleted

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.112

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by modifying Claude Code to handle the Ctrl+Backspace shortcut correctly, potentially by adding support for the corresponding escape sequence.

Guidance

  • Investigate the escape sequences used by Ctrl+Backspace and Alt+Backspace in Windows Terminal and PowerShell to understand the differences.
  • Review the code handling keyboard shortcuts in Claude Code to determine why Ctrl+Backspace is not working as expected.
  • Consider adding a conditional statement to handle the Ctrl+Backspace shortcut specifically for Windows platforms.
  • Test the modified code to ensure that Ctrl+Backspace deletes the previous word in Claude Code's chat input without breaking other functionality.

Example

No code snippet can be provided without more information about the internal implementation of Claude Code. However, the solution might involve adding a case for the Ctrl+Backspace shortcut in the keyboard event handling code.

Notes

The issue seems to be platform-specific, and the fix might need to account for differences in how Windows Terminal and PowerShell handle keyboard shortcuts. The provided related issues are macOS-specific, so the solution might not be directly applicable.

Recommendation

Apply a workaround by modifying Claude Code to handle the Ctrl+Backspace shortcut, as upgrading to a fixed version is not mentioned as an option, and the current version (2.1.112) does not seem to support this functionality.

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

Ctrl+Backspace deletes the previous word in Claude Code's chat input, consistent with Windows terminal behavior.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING