gemini-cli - ✅(Solved) Fix [Bug] Tombol Backspace menghapus seluruh kata (salah terdeteksi sebagai Ctrl+Backspace) [1 pull requests, 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
google-gemini/gemini-cli#25907Fetched 2026-04-24 10:43:21
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1labeled ×1

Fix Action

Fixed

PR fix notes

PR #25882: fix(cli): restrict ctrl+backspace detection to Windows Terminal only

Description (problem / solution / changelog)

Summary

  • PR #21447 introduced ctrl+backspace word deletion for Windows, but the condition OS === 'Windows_NT' was too broad
  • Previous implementation tried to infer Ctrl+Backspace on Windows using environment heuristics (OS, WT_SESSION)
  • This was unreliable: cmd.exe and PowerShell send \b for plain backspace, causing unintended word deletion
  • Removed ctrl=true inference entirely
  • \b is now consistently treated as a normal backspace

Details

Related Issues

Fixes #25867 #25856 #25907

How to Validate

Pre-Merge Checklist

<!-- Check all that apply before requesting review or merging. -->
  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

Changed files

  • packages/cli/src/ui/contexts/KeypressContext.test.tsx (modified, +4/-4)
  • packages/cli/src/ui/contexts/KeypressContext.tsx (modified, +1/-9)
RAW_BUFFERClick to expand / collapse

What happened?

Ketika menekan tombol Backspace di Gemini CLI, tombol tersebut menghapus seluruh kata, bukan satu karakter saja. Hal ini terjadi secara konsisten di semua terminal (VS Code, CMD, PowerShell). Saya mengaktifkan logging penekanan tombol debug dan menemukan bahwa tombol Backspace terdaftar dengan ctrl: true.

[DEBUG] Keystroke: {"name":"backspace","shift":false,"alt":false,"ctrl":true,"cmd":false,"insertable":false,"sequence":"\b"}

Catatan: Meskipun saya hanya menekan tombol Backspace fisik, CLI menafsirkannya seolah-olah pengubah Ctrl aktif.

<img width="959" height="54" alt="Image" src="https://github.com/user-attachments/assets/505f3f9c-2946-4be6-a872-9c25a617ea19" />

What did you expect to happen?

Menekan Backspace seharusnya hanya menghapus satu karakter (ctrl: false).

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f3413
  • Session ID: 5dba1e59-6ed4-44a2-bfb0-369f0e394e4d
  • Operating System: win32 v22.14.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 314.6 MB
  • Terminal Name: Windows Terminal / Antigravity
  • Terminal Background: Unknown
  • Kitty Keyboard Protocol: Unsupported

Login information

Saya login menggunakan Google Account

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can be fixed by adjusting the keyboard settings or configuration to prevent the Ctrl key from being registered when pressing the Backspace key.

Guidance

  • Investigate the terminal settings (e.g., Windows Terminal, VS Code) to see if there's an option to disable or modify the Ctrl key behavior when pressing Backspace.
  • Check the Gemini CLI documentation for any specific configuration options related to keyboard input or keystroke handling.
  • Verify if the issue persists when using a different terminal or environment to isolate the problem.
  • Consider reporting the issue to the Gemini CLI developers or maintainers, providing the debug log and client information for further assistance.

Notes

The issue seems to be related to the keyboard input handling in the Gemini CLI, specifically with the Backspace key being registered as Ctrl+Backspace instead of a single Backspace key press.

Recommendation

Apply workaround: Adjust the terminal settings or keyboard configuration to prevent the Ctrl key from being registered when pressing the Backspace key, as this seems to be the most likely cause of the issue.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

gemini-cli - ✅(Solved) Fix [Bug] Tombol Backspace menghapus seluruh kata (salah terdeteksi sebagai Ctrl+Backspace) [1 pull requests, 1 comments, 2 participants]