Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.163.0
What subscription do you have?
Not relevant to terminal input handling.
Which model were you using?
Not model-dependent.
What platform is your computer?
Windows 11 Pro 10.0.26300, x86_64
What terminal emulator and version are you using (if applicable)?
Windows Terminal 1.24.12741.0
Native Windows Codex, not WSL. The same keys work under WSL.
Codex doctor report
Not collected. The failure is in the keyboard-event parser Codex pins.
What issue are you seeing?
With a Russian or Armenian keyboard layout active, Ctrl+C is not recognized by the Codex TUI on
Windows. Ctrl+D, Ctrl+R, Ctrl+T and the other Ctrl+letter shortcuts fail the same way. Switching
to an English layout makes them work again.
Windows delivers Ctrl+C as a console key record whose character is the control code 0x03. The
pinned crossterm (openai-oss-forks/crossterm@ed1cdab) sends every control code through
get_char_for_key, which looks the key up in the active layout with no modifiers. Under a
non-Latin layout that returns the layout's character or nothing, so no binding matches. A probe
that prints crossterm's event::read() recorded these Ctrl+C presses:
| Layout | Reported by the pinned crossterm | Reported with the fix |
|---|---|---|
| English | Char('c') + CONTROL |
Char('c') + CONTROL |
| Russian | no event | Char('c') + CONTROL |
| Armenian | Char('ց') (U+0581) + CONTROL |
Char('c') + CONTROL |
This is the Windows counterpart of #35599, which covers the same symptom from the kitty keyboard
protocol on Linux and macOS. The two paths are separate: #35599 needs the base-layout key from
crossterm#1074, and this one is fixed in crossterm's Windows parser.
What steps can reproduce the bug?
- On Windows, add a Russian keyboard layout and switch to it.
- Run
codex. - Press Ctrl+C, or Ctrl+D with an empty composer.
- Nothing happens. With an English layout, the same keys show the quit hint or quit.
At the parser level: a key record with u_char = 0x03, LEFT_CTRL_PRESSED and virtual key
0x43 is looked up in the active layout instead of being reported as Ctrl+C.
What is the expected behavior?
Ctrl+letter shortcuts work whatever keyboard layout is active, as they do on an English layout
and under WSL.
Additional information
Fix in crossterm: crossterm-rs/crossterm#1156
When Ctrl is held without Alt, the parser reports Ctrl+A to Ctrl+Z by their control codes
(0x01..=0x1a) instead of going through the layout lookup. Armenian sends Ctrl+Shift+letter with
no character, so for those records the letter comes from the virtual key.
The table above comes from a probe built on the pinned crossterm before and after the fix. A Codex
build with the patched crossterm was also checked by hand under the Russian and Armenian layouts.
For Codex, the change is a crossterm pin bump in codex-rs/Cargo.toml, Cargo.lock and
MODULE.bazel.lock once the fork includes it.
Activity
etraut-openai commentedon Oct 25, 2026
(response from codex)
Thanks for the raw key records and the before/after probe. I reproduced this with Codex 0.163.0 on Windows 11: with the Russian layout active, Ctrl+C left the draft in place. I switched to English in the same terminal session, and Ctrl+C cleared that exact draft. Ctrl+D on an empty composer showed the same layout dependence.
Leaving this open as a reminder for us: Windows delivers the Ctrl+C control code (
0x03), but the version of crossterm we ship looks the key up again in the active layout. By the time Codex handles shortcuts, it can have the wrong character or no key event at all.The upstream fix to track is crossterm#1156. When we next update crossterm, let’s check whether that fix is included and retry Ctrl+C and Ctrl+D on native Windows with Russian and Armenian layouts before closing this. In the meantime, switching to English for the shortcut is a verified workaround.