AltGr and paste blocked inside Codex CLI 0.31.0

Resolved 💬 7 comments Opened Sep 9, 2025 by toni-pih Closed Nov 17, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.
  • Version: codex CLI 0.31.0 (installed via npm)
  • OS: Windows 11, build 26100.4946
  • Keyboard layout: Spanish (ES / ES‑LA)
  • Terminals affected: PowerShell, CMD, Git Bash, IntelliJ IDEA embedded terminal
  • Extra config: setting TERM=dumb in PowerShell had no effect

Repro steps:

  1. Open PowerShell/CMD/Git Bash/IntelliJ Terminal.
  2. Run codex.
  3. Type “@” using AltGr (e.g., AltGr+2 on ES, AltGr+Q on ES‑LA).
  4. Try to paste “@” using Ctrl+V or Shift+Insert.

Expected behavior:

  • “@” is produced according to the keyboard layout.
  • Pasting works inside the Codex CLI.

Actual behavior:

  • “@” does not appear (other AltGr combos like “|”, “#” likely also fail).
  • Pasting with Ctrl+V and Shift+Insert does not work inside Codex.
  • Outside Codex (same terminals), both AltGr and paste work normally.

Workarounds tried:

  • TERM=dumb in PowerShell/CMD: no effect.
  • Pasting with Ctrl+V or Shift+Insert: no effect inside Codex.
  • winpty codex in Git Bash: not verified due to npm binary not in PATH (could not easily resolve at time of testing).
  • WSL is not an option in this environment.

Impact:

  • High severity for non‑US keyboard layouts: cannot type or paste “@” (critical for emails, URLs, etc.).

Notes / suspicion:

  • On Windows, AltGr is emitted as Ctrl+Alt. Codex CLI likely sets the terminal to “raw mode” and doesn’t translate AltGr key events to Unicode characters; paste shortcuts also appear blocked while in raw mode.

Suggestions:

  • On Windows, use console APIs that translate key events to Unicode (ReadConsoleInputW/WriteConsoleW) or avoid setRawMode(true) for win32 and rely on readline.emitKeypressEvents with proper layout handling.
  • Provide a flag like --no-raw / --basic-input to disable raw mode and allow AltGr + paste to work as a compatibility path.
  • Consider documenting a supported workaround for MINGW (e.g., running via winpty) and test with ES/ES‑LA layouts across ConHost/Windows Terminal/ConPTY.

User details:

  • Windows 11 26100.4946, Codex CLI 0.31.0 via npm.
  • AltGr and paste blocked in all tested terminals; TERM=dumb had no effect.

View original on GitHub ↗

7 Comments

vikamwh · 10 months ago

same with CLI 0.30.0

LeoToledo · 10 months ago

Having the same problem here

Bl4ckh34d · 10 months ago

Same, all AltGr keys (on German keyboard this includes [] \ @ etc. quite the hindrance considering the $200 I pay for it.

pedershk · 9 months ago

Can confirm this is STILL present in 0.45 - have to switch to US Enligsh keyboard. It doesn't even work with UK English. My default keyboard is Norwegian - also an AltGr-using keyboard language

vikamwh · 9 months ago

Same in version 0.46
When I paste the path C:\Windows\System32\drivers\etc\hosts, I see C:WindowsSystem32driversetchosts
In claude code, that works fine!

joshua-lehmann · 8 months ago

@etraut-openai
I am running into the same issue. On a German/Swiss keyboard the @ symbol is typed using Alt Gr + 2, but in the latest Codex CLI versions (around 0.5x) this no longer works inside Windows Terminal. I cannot type @ at all.

This is a major problem because @ is required to trigger the Codex file selection and completion flow, which is one of the most important features of the tool. It used to work in older versions (around 0.4x) but now it is completely blocked.

My environment:

  • Windows 11 Enterprise
  • Version 24H2 (OS Build 26100.6899)
  • German/Swiss keyboard layout
  • Codex CLI installed via npm (npm install -g @openai/codex)
  • Codex version shown in terminal:

``
>_ OpenAI Codex (v0.57.0)
model: gpt-5-codex medium
directory: ~
``

  • Same behaviour as the original poster: normal apps accept Alt Gr + 2 but the Codex prompt blocks it.

Would be great if this could be fixed because it makes the CLI almost unusable on a Swiss/German keyboard.
Thanks!

etraut-openai contributor · 8 months ago

The AltGr issue is fixed by this PR. This will be included in the next release.