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
- Install a voice dictation tool (e.g., Typeless) and set Right Alt as the push-to-talk hotkey
- Open Claude Code in a terminal
- Press and hold Right Alt, speak a sentence, then release
- 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.
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
[25~prependedExpected 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~:Additional Context