mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Crossterm's Windows event backend expects Win32 input records. When the console inherits virtual terminal input mode, or another console client restores it, navigation keys instead arrive as literal escape bytes. ## What changed - Keep the Windows console in input-record mode while the event stream is polled, and disable focus-change reporting on Windows. - Preserve and restore the console's original virtual terminal input setting when the TUI shuts down. ## Testing - Add unit coverage for clearing and restoring the virtual terminal input bit. GitOrigin-RevId: 792b99e354fce357d51810a6c3b437e972ad11ce