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:
- Open PowerShell/CMD/Git Bash/IntelliJ Terminal.
- Run codex.
- Type “@” using AltGr (e.g., AltGr+2 on ES, AltGr+Q on ES‑LA).
- 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.
7 Comments
same with CLI 0.30.0
Having the same problem here
Same, all AltGr keys (on German keyboard this includes [] \ @ etc. quite the hindrance considering the $200 I pay for it.
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
Same in version 0.46
When I paste the path
C:\Windows\System32\drivers\etc\hosts, I seeC:WindowsSystem32driversetchostsIn claude code, that works fine!
@etraut-openai
I am running into the same issue. On a German/Swiss keyboard the
@symbol is typed usingAlt 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:
npm install -g @openai/codex)``
``>_ OpenAI Codex (v0.57.0)
model: gpt-5-codex medium
directory: ~
Alt Gr + 2but 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!
The AltGr issue is fixed by this PR. This will be included in the next release.