gemini-cli - 💡(How to fix) Fix bug(cli): Incorrect backspace handling on Windows PowerShell 7 (ctrl flag and empty sequence) [1 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#26085Fetched 2026-04-28 06:49:39
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1
RAW_BUFFERClick to expand / collapse

What happened?

On Windows 10 using PowerShell 7 (v7.6.1), the backspace key is incorrectly processed by the input parser in Gemini CLI v0.39.1. Specifically, when a standard backspace is pressed:

  1. A \b (0x08) input is incorrectly flagged with ctrl: true even without the Ctrl key being held.
  2. A \x7F (127) input results in an empty sequence string ("") in the debug logs.

This causes standard backspace inputs to conflict with Ctrl+Backspace keybindings and prevents proper input handling in the PowerShell 7 environment.

What did you expect to happen?

The backspace key should be identified with ctrl: false (unless Ctrl is actually pressed) and the sequence should correctly reflect the input character (\b or \x7F).

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f3413
  • Session ID: 5033901d-bd22-4ea9-b017-6f0c15658e14
  • Operating System: win32 v22.14.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3-flash-preview
  • Auth Type: oauth-personal
  • Memory Usage: 264.2 MB
  • Terminal Name: Unknown
  • Terminal Background: Unknown
  • Kitty Keyboard Protocol: Unsupported

Login information

Google Account

Anything else we need to know?

Reproduction Steps: 1. Launch Gemini CLI v0.39.1 on Windows 10 with PowerShell 7.6.1. 2. Enable debugKeystrokeLogging in settings. 3. Press the Backspace key and observe the debug output.

<img width="1080" height="685" alt="Image" src="https://github.com/user-attachments/assets/bfe580fa-4d09-43d1-b53c-f7a1b2e80a63" />

extent analysis

TL;DR

The issue can be addressed by updating the input parser in Gemini CLI to correctly handle backspace key inputs on Windows 10 with PowerShell 7.

Guidance

  • Verify that the issue is specific to PowerShell 7 by testing the Gemini CLI on a different shell or environment.
  • Check the debug logs to confirm that the backspace key is being flagged with ctrl: true and the sequence is being logged as an empty string.
  • Investigate the input parser code to determine why the backspace key is being incorrectly flagged with ctrl: true.
  • Consider adding a workaround to ignore the ctrl flag for backspace key inputs or to handle the \x7F input character correctly.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The issue appears to be specific to the combination of Windows 10, PowerShell 7, and Gemini CLI v0.39.1. The root cause is likely related to the input parser implementation.

Recommendation

Apply a workaround to ignore the ctrl flag for backspace key inputs or to handle the \x7F input character correctly, as updating to a fixed version is not currently an option.

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 - 💡(How to fix) Fix bug(cli): Incorrect backspace handling on Windows PowerShell 7 (ctrl flag and empty sequence) [1 participants]