tui: add --no-keyboard-enhancement for terminal compatibility
Resolved 💬 1 comment Opened Feb 26, 2026 by wegel Closed Apr 3, 2026
Summary
Add a TUI CLI flag to disable keyboard enhancement escape modes:
--no-keyboard-enhancement
Why
Some terminals show broken behavior when keyboard enhancements are enabled. A concrete case is foot, where copy shortcuts like Ctrl+Shift+C can trigger unexpected focus/refocus behavior back to the input box.
A flag-based opt-out provides a minimal compatibility path without changing defaults for terminals where enhancements work correctly.
Proposed behavior
- New flag:
codex --no-keyboard-enhancement - Also supported via
codex resume --no-keyboard-enhancement - Default behavior remains unchanged (enhancements enabled unless explicitly disabled)
Ready implementation
I have a complete, tested implementation in my fork:
- Branch: https://github.com/wegel/codex/tree/pr/no-keyboard-enhancement
- Compare: https://github.com/openai/codex/compare/main...wegel:pr/no-keyboard-enhancement?expand=1
- Commit:
61a5d3b2ea9f86ece6cf608e1f06d823f82db38e
Validation run
cargo test -p codex-cli resume_no_keyboard_enhancement_flag_sets_mode -- --nocapture- Manual verification in
foot: copy behavior works correctly with--no-keyboard-enhancement
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗