Skip to content

Fix Shift+Backspace deleting a word instead of a character#11563

Open
TylerBuilds-Official wants to merge 1 commit into
warpdotdev:masterfrom
TylerBuilds-Official:TylerBuilds-Official/kitty-kb-shift-win-fix
Open

Fix Shift+Backspace deleting a word instead of a character#11563
TylerBuilds-Official wants to merge 1 commit into
warpdotdev:masterfrom
TylerBuilds-Official:TylerBuilds-Official/kitty-kb-shift-win-fix

Conversation

@TylerBuilds-Official
Copy link
Copy Markdown

@TylerBuilds-Official TylerBuilds-Official commented May 22, 2026

Description

On Windows, Shift+Backspace in TUIs running inside Warp (Claude Code, fish, ipython, psql, etc.) deletes an entire word instead of a single character. Root cause: winit's text_with_all_modifiers() returns 0x08 (Ctrl+H) for Shift+Backspace on Windows, which readline-style line editors universally bind to backward-kill-word. Every other terminal tested on Windows (WezTerm, Windows Terminal, vanilla PowerShell, bash) emits 0x7f (DEL) for both plain and Shift+Backspace.

Fix adds a fallback to to_escape_sequence in crates/warp_terminal/src/model/escape_sequences.rs that emits DEL for backspace when no earlier branch in the chain claims it. Guarded to unmodified or shift-only keystrokes so Ctrl/Alt/Cmd+Backspace continue to flow through their existing paths untouched.

Linked Issue

Fixes #11342

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Screenshots are included below.

Testing

Added regression test test_shift_backspace_emits_del_sequence in escape_sequences_tests.rs asserting both backspace and shift-backspace keystrokes produce vec![C0::DEL] via to_escape_sequence. Before the fix, both fail (the chain returns None and the caller falls back to OS-provided chars, which is 0x08 for Shift+Backspace on Windows). After the fix, both pass.

Byte-level evidence captured before opening this PR (script + outputs in #11342):

  • Warp before fix: Backspace → 0x7f, Shift+Backspace → 0x08

  • Warp after fix: Backspace → 0x7f, Shift+Backspace → 0x7f

  • WezTerm (same machine, same OS): 0x7f for both, matching the new Warp behavior

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Before the fix:

warp-bugtest-bug-01

Holding shift and pressing backspace:
warp-bugtest-bug-01 1

After the fix:
warp-bugtest-01-fix

Holding shift and pressing backspace:
warp-bugtest-01 1-fix

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fix Shift+Backspace deleting a whole word instead of one character on Windows

  On Windows, winit's text_with_all_modifiers() returns 0x08 (Ctrl+H)
  for Shift+Backspace, which readline-style TUIs interpret as
  backward-kill-word. Add a fallback in to_escape_sequence that emits
  DEL (0x7f) for unmodified and shift-only backspace.

  Fixes warpdotdev#11342
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 22, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @TylerBuilds-Official on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 22, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 22, 2026

@TylerBuilds-Official

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@cla-bot cla-bot Bot added the cla-signed label May 22, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 22, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR changes legacy terminal keystroke encoding so unmodified and Shift+Backspace emit DEL (0x7f) before falling back to platform-provided text, and adds a regression test for plain Backspace and Shift+Backspace.

Concerns

  • The implementation looks aligned with the linked bug and no security concerns were found in the changed lines.
  • For this user-facing terminal behavior change, please include screenshots or a short screen recording demonstrating it working end to end. The PR description checks the screenshots box, but the Screenshots / Videos section is empty.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@TylerBuilds-Official
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 22, 2026

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shift + Backspace acting as CTRL + Backspace

1 participant