fix(tui): disable REPORT_ALTERNATE_KEYS on Windows to prevent Mouse Properties dialog#9371
fix(tui): disable REPORT_ALTERNATE_KEYS on Windows to prevent Mouse Properties dialog#9371Flewrider wants to merge 2 commits intoopenai:mainfrom
Conversation
…roperties dialog The REPORT_ALTERNATE_KEYS keyboard enhancement flag (part of Kitty Keyboard Protocol) causes issues on Windows Terminal/conpty. When enabled, certain escape sequences can be misinterpreted as system keyboard shortcuts that trigger control panel applets like the Mouse Properties dialog (main.cpl). This change conditionally disables REPORT_ALTERNATE_KEYS on Windows while keeping DISAMBIGUATE_ESCAPE_CODES and REPORT_EVENT_TYPES enabled, which are sufficient for Shift+Return functionality. Affected files: - codex-rs/tui/src/tui.rs - codex-rs/tui2/src/tui.rs - codex-rs/cloud-tasks/src/lib.rs
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@Flewrider, thanks for the additional details you provided in the bug report thread. Based on this, I think we're going to pass on this PR. We don't have a strong enough understanding of the causal link between the proposed fix and the root cause of the issue. That makes the change risky because it could have other side effects that we don't understand. I'm going to close the PR, but we can keep the bug report open for now. If you'd like to continue to do more exploration to understand the root cause, you're welcome to do so. We probably won't invest any more time in this unless we hear from other Codex users that they're seeing a similar problem. So far, you're the only one who has reported this. |

Summary
Fixes #9370
When running Codex on Windows, the Mouse Properties control panel dialog (
main.cpl) sometimes opens unexpectedly during normal TUI usage.Root Cause
The
REPORT_ALTERNATE_KEYSkeyboard enhancement flag (part of Kitty Keyboard Protocol) causes issues on Windows Terminal/conpty. When enabled, certain escape sequences can be misinterpreted as system keyboard shortcuts that trigger control panel applets.Solution
Conditionally disable
REPORT_ALTERNATE_KEYSon Windows using#[cfg(not(windows))]:The other two flags (
DISAMBIGUATE_ESCAPE_CODESandREPORT_EVENT_TYPES) are sufficient for Shift+Return functionality on Windows.Files Changed
codex-rs/tui/src/tui.rs- Original TUIcodex-rs/tui2/src/tui.rs- New TUIcodex-rs/cloud-tasks/src/lib.rs- Cloud tasks UITesting