Ctrl+C and Ctrl+D are not recognized with a Cyrillic layout under Kitty keyboard enhancement
What version of Codex CLI is running?
codex-cli 0.145.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?
Linux 6.17.0-122035-tuxedo x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
A terminal implementing Kitty keyboard enhancement with alternate-key reporting. The original runtime observation was captured with Shitty 2026.07.23, but the failure can be reproduced directly from the CSI-u input below and does not depend on terminal-specific behavior.
No terminal multiplexer is involved.
Codex doctor report
Not collected; the failure is reproducible in the keyboard-event parser pinned by Codex.
What issue are you seeing?
With a Cyrillic keyboard layout active, physical Ctrl+C and Ctrl+D are not recognized by the Codex TUI when the terminal reports Kitty base-layout keys.
The protocol-level inputs are:
- physical Ctrl+C under the Russian layout:
ESC[1089::99;5:1u - physical Ctrl+D under the Russian layout:
ESC[1074::100;5:1u
In these packets, 1089 and 1074 are the active-layout characters с and в; 99 and 100 are the base-layout characters c and d.
Codex 0.145.0 pins Crossterm 0.28.1 from nornagon/crossterm revision 87db8bfa6dc99427fd3b071681b07fc31c6ce995. Its CSI-u parser reads the primary codepoint but does not retain the third base-layout component. The resulting events are Ctrl+с and Ctrl+в, while Codex matches the shortcuts against ASCII Ctrl+c and Ctrl+d.
The same physical keys work through legacy keyboard encoding when keyboard enhancement is disabled.
What steps can reproduce the bug?
Parser-level reproduction against the Crossterm revision pinned by Codex:
- Pass
b"\x1b[1089::99;5:1u"toparse_csi_u_encoded_key_code. - Observe a Ctrl+с key event; base-layout codepoint
99is not represented in the result. - Pass
b"\x1b[1074::100;5:1u"through the same parser. - Observe a Ctrl+в key event; base-layout codepoint
100is not represented in the result.
Runtime reproduction:
- Run Codex in a terminal that implements Kitty alternate-key reporting.
- Switch to a Russian keyboard layout.
- Press the physical Ctrl+C or Ctrl+D key.
- Observe that the corresponding Codex action is not triggered.
- Start Codex with
CODEX_TUI_DISABLE_KEYBOARD_ENHANCEMENT=1 codexand repeat. The shortcuts are recognized through legacy keyboard encoding.
What is the expected behavior?
Ctrl+C and Ctrl+D shortcuts should remain usable when a non-Latin keyboard layout is active and the terminal supplies the corresponding base-layout key.
Additional information
The missing base-layout support is tracked upstream in Crossterm:
https://github.com/crossterm-rs/crossterm/issues/968
Kitty defines unicode-key-code::base-layout-key and explicitly describes Cyrillic Ctrl+C as a use case:
https://sw.kovidgoyal.net/kitty/keyboard-protocol/#key-codes
Pinned parser implementation: