Windows: Polish (and other AltGr-dependent) characters not typed in CLI input on native Windows / Conpty

Status Closed — not planned
Reported on v2.1.119
Maintainer reply None cached
Activity 7 comments · opened Apr 26, 2026 · closed Jun 13, 2026

Environment

  • Claude Code: 2.1.119
  • Node.js: 22.22.2
  • OS: Windows 11 Enterprise 24H2 (build 26200.x)
  • Terminal: Windows Terminal 1.24.10921.0 (default PowerShell profile)
  • Shell: PowerShell 7.6.1 (Core)
  • Active keyboard layout: Polish (Programmers) — KLID 00000415, verified via [System.Windows.Forms.InputLanguage]::CurrentInputLanguage
  • System locale: pl-PL
  • Beta UTF-8 worldwide language support: ON (ACP=OEMCP=MACCP=65001)
  • Console encoding inside process: [Console]::InputEncoding = [Console]::OutputEncoding = utf-8 (CP 65001)

Repro

  1. On a Windows machine with Polish (Programmers) layout active in Windows Terminal.
  2. Run claude so the TUI prompt has focus.
  3. Press AltGr+a (the standard binding for ą on Polish Programmers).
  4. Expected: ą is inserted in the prompt.
  5. Actual: nothing happens. The character is swallowed before reaching the input.

Same behaviour for the full AltGr-mapped Polish set: ą ę ć ł ń ó ś ź ż (and capitalised variants with Shift+AltGr+letter).

Confirmed NOT the cause

Verified on the affected machine:

  • System encoding is UTF-8 end-to-end (Beta UTF-8 worldwide ON).
  • Active keyboard layout is Polish (Programmers); the same key combos produce ą correctly in every other Windows process tested in the same Windows Terminal tab: pure pwsh prompt, node -i REPL, Codex CLI, GUI apps.
  • Pasting ą from the clipboard into the claude prompt works — it is only direct keyboard input that is dropped.
  • Not a Windows Terminal config issue: confirmed by Codex CLI working with Polish input in the same WT tab/profile.

Workaround tested and ALSO failing

PowerToys Quick Accent (Microsoft Win32 utility that injects the chosen accented character via SendInput) also fails to deliver characters into claude. It works in every other Windows app on the machine. This is a strong signal that the issue is not specifically AltGr scancode handling — it is unicode characters delivered through the normal Windows input pipeline being dropped at the TUI layer.

Probable root cause (hypothesis)

On Windows, Conpty delivers KEY_EVENT_RECORDs with both a virtual-key code + modifier flags and a UnicodeChar field. AltGr on Polish Programmers maps AltGr+a to:

  • wVirtualKeyCode = VK_A
  • dwControlKeyState = RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED
  • UnicodeChar = U+0105 (ą)

If the input handler dispatches on (modifier flags + VK) to detect shortcuts (e.g. Ctrl+Alt+A) before falling through to UnicodeChar, then on AltGr layouts the unicode character is silently dropped. The same logic explains why injected unicode (PowerToys SendInput) is also lost — it arrives as a synthesised key event with UnicodeChar set but the dispatcher has already classified it as a non-character event.

This is consistent with Node readline raw-mode behaviour on Windows when Conpty key events are not pre-decomposed into character vs control streams.

Related issues (cross-platform variants of the same family)

  • #22174 — macOS Polish via Option key (open, platform:macos)
  • #42523 — WSL2 AltGr @ for Nordic (open, platform:wsl)
  • #14440 — macOS Polish in Terminal.app (closed as duplicate)

Impact

Hard blocker for CLI use by speakers of any AltGr-dependent layout — Polish, Czech, Hungarian, German Extended, Slovak, Spanish-International, Croatian, Slovenian, etc. Forces:

  • using Claude Code Desktop app instead of CLI, or
  • Codex CLI instead of Claude Code, or
  • continuous ASCII transliteration during a session.

Suggested fix direction (for triage)

At the input layer: if the incoming key event has a non-zero UnicodeChar and the modifier combination is RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED (the canonical AltGr signature on Win32), prefer the UnicodeChar payload over treating the event as a Ctrl+Alt shortcut. Equivalently: short-circuit shortcut dispatch when UnicodeChar is set and the only active modifiers are AltGr's pair.

View original on GitHub ↗

6 Comments

0xbrainkid · 5 months ago

This is a strong bug report because it isolates the failure to interactive input handling inside Claude Code, not general Windows Unicode support.

Two details make the likely root cause pretty convincing:

  • the exact same Windows Terminal tab/profile accepts the characters in other processes
  • even PowerToys Quick Accent / injected Unicode is swallowed

That makes this look less like a keyboard-layout edge case and more like the TUI input layer classifying Win32/Conpty key events too early as control chords instead of honoring the character payload when UnicodeChar is present.

The AltGr point matters beyond Polish specifically: on Windows, AltGr is effectively RightAlt + RightCtrl, so any shortcut-dispatch path that prioritizes modifiers over emitted character data will break whole language families while seeming fine on US layouts.

So I agree with the suggested fix direction. If the event carries a non-zero Unicode character and the modifier state is just the AltGr pair, the character should win over shortcut interpretation. Otherwise the CLI is functionally excluding users who rely on non-ASCII daily input.

giuliohome · 5 months ago

+1 from Italian keyboard layout. Same mechanism, different chars dropped:

  • AltGr+E (€)
  • AltGr+plus (])
github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

giuliohome · 4 months ago

IT IS STILL AN ISSUE!!!!

giuliohome · 4 months ago

Why is this closed??? that makes no sense to me

Lukeini · 3 months ago

Requesting reopen. This was auto-closed as not_planned by github-actions on 2026-06-13, but the underlying bug was never fixed: AltGr-mapped characters (Polish ą ę ć ł ń ó ś ź ż and analogous layouts) were still swallowed by the CLI TUI on native Windows/Conpty at our last check, and none of the recent release notes mention a fix in this area (reviewed v2.1.206-v2.1.212). Happy to re-verify on the current release and attach fresh diagnostics on request.

The repro signature is unchanged: direct keyboard input is dropped while the same keystrokes work in every other app in the same Windows Terminal tab (pure pwsh, node REPL, Codex CLI), and clipboard paste works - which still matches the UnicodeChar-dispatch hypothesis from the report: when a Conpty KEY_EVENT_RECORD carries a non-zero UnicodeChar with the canonical AltGr modifier signature (RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED), prefer the UnicodeChar payload over classifying the event as a Ctrl+Alt shortcut. That one dispatch-order change would cover Polish, Czech, Hungarian, German-Extended, Slovak, Spanish-International, and every other AltGr layout.

The cross-platform siblings of this family remain open (#22174 macOS Option-key, #42523 WSL2 AltGr), so a not_planned close on the Windows variant alone reads as stale-bot noise rather than a triage decision. This remains a hard blocker for CLI use on any AltGr-dependent keyboard layout.

Showing cached comments. Read the full discussion on GitHub ↗