-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Support mouse event handling for seamless cursor movement in TUI #14315
Description
I'm looking to add mouse event handling support to the Codex CLI's TUI, enabling seamless cursor movement by clicking directly within the TUI interface—this aligns with the click-to-move cursor in shell prompts feature introduced in Ghostty 1.3.0 (and similar modern terminal emulators that support OSC 133 click-events / cl=line extensions or Kitty's click_events ).
Currently, the Codex TUI relies solely on keyboard input for cursor navigation. Adding mouse support would significantly improve the user experience, especially in modern terminal emulators that natively support mouse-based cursor control for shell prompts/TUIs (e.g., Ghostty, Kitty).
Use Case
Users running Codex CLI in terminals with mouse event support (like Ghostty 1.3.0+) should be able to click anywhere in the Codex TUI to move the cursor directly to that position, just like interacting with a native text field or supported shell prompts (Fish 4.1+, Nushell 0.111+ in Ghostty).
Reference
Ghostty 1.3.0 click-to-move cursor feature documentation:
https://ghostty.org/docs/install/release-notes/1-3-0#click-to-move-cursor-in-shell-prompts
This feature leverages OSC 133 Semantic Prompts specification extensions ( click-events , cl=line ) and/or Kitty's click_events extension—adopting these standards would ensure compatibility with most modern terminals that support mouse-based cursor control.
Request
Implement mouse event handling in the Codex TUI to support:
1. Click-to-position cursor anywhere in the TUI interface
2. Compatibility with terminal emulators that support OSC 133 click-events / cl=line or Kitty's click_events
3. Seamless cursor movement without relying exclusively on keyboard input