Skip to content

Right Alt key leaves visible [25~ escape sequence residue in input #25943

@zleo77818

Description

@zleo77818

Bug Description

When using voice dictation software (e.g., Typeless) that binds the Right Alt key as a push-to-talk hotkey, each dictated sentence is prefixed with [25~ in Claude Code's input field.

This happens because pressing/releasing the Right Alt key generates the ANSI escape sequence \e[25~ in the terminal. The ESC byte (0x1B) is consumed by the input handler, but the remaining [25~ is not recognized as part of an escape sequence and leaks into the input as literal text.

Steps to Reproduce

  1. Install a voice dictation tool (e.g., Typeless) and set Right Alt as the push-to-talk hotkey
  2. Open Claude Code in a terminal
  3. Press and hold Right Alt, speak a sentence, then release
  4. The transcribed text appears with [25~ prepended

Expected Behavior

The escape sequence should be fully consumed/discarded, and only the dictated text should appear in the input.

Actual Behavior

Every dictated sentence is prefixed with [25~:

[25~This is my first sentence.
[25~This is my second sentence.

Additional Context

  • OS: Windows 10 Pro
  • Terminal: Windows Terminal (Git Bash)
  • OpenAI Codex CLI running in the same terminal does NOT have this issue — it properly handles the escape sequence. This indicates the problem is specific to Claude Code's input handling, not the terminal itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatform:windowsIssue specifically occurs on Windows

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions