[BUG] AltGr characters (€, @) broken in WSL2: Ctrl+Alt synthesis conflicts with TUI readline shortcuts
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
AltGr-based characters (e.g. € via AltGr+E, @ via AltGr+Q on German/European layouts) cannot be typed in the Claude Code input prompt when running inside WSL2 on Windows Terminal.
The same characters work correctly:
- In plain bash in the same WSL2 session
- In any other terminal application
Root Cause
Windows internally represents AltGr as Ctrl + Alt (a synthetic key combination). The key event reaching Claude Code's Ink-based TUI therefore carries both the Ctrl and Alt modifiers alongside the character key.
Claude Code's TUI processes the Ctrl part first as a readline-style shortcut:
| AltGr combo | Intended char | Ctrl shortcut fired |
|---|---|---|
| AltGr+E | € | Ctrl+E → move-to-end-of-line |
| AltGr+Q | @ | Ctrl+Q → XOFF / quit |
The Alt modifier is then left dangling or ignored. The character is never inserted.
Bash/readline avoids this because it has explicit AltGr-awareness and strips the synthetic Ctrl before routing the key. Claude Code's Ink TUI does not.
What Should Happen?
When the TUI receives Ctrl+Alt+<key>, it should detect this as an AltGr sequence (on Windows/WSL) and not dispatch the Ctrl+<key> readline binding. The composed character should be inserted instead.
Environment
- OS: Windows 11 + WSL2 (kernel 5.15.153.1-microsoft-standard-WSL2)
- Terminal: Windows Terminal
- Keyboard layout: German / European (AltGr used for
€,@,[,],{,},\, etc.) - Claude Code version: latest
Workarounds
Ctrl+Shift+U→ type Unicode codepoint → Enter (e.g.20acfor€)- Type the character in another app and paste with
Ctrl+Shift+V stty -ixonin.bashrcfreesCtrl+Q, but does not fix the interception inside Claude Code
Related Issues
- #42523 — @ sign broken on Nordic layout in WSL2 (same root cause, narrower scope)
- #53451 — AltGr broken on native Windows / ConPTY
- #18221 — Alt/Option shortcuts break international layouts (closed stale)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗