Skip to content

Support mouse click to move cursor in TUI input box #23652

Description

@xiaodream551-a11y

Summary

Add mouse event handling to the Codex CLI's TUI input box so users can click directly to move the cursor, instead of relying on keyboard navigation only.

Background

This was previously requested in #14315, which was closed due to insufficient upvotes. Reopening / re-requesting because the need still stands and modern terminals increasingly support this interaction (Ghostty 1.3.0+, Kitty, WezTerm, etc.).

Use case

When editing a long prompt in the Codex CLI input box, repositioning the cursor with arrow keys / Ctrl+A / Ctrl+E is slow. Clicking the desired position with the mouse — like in any GUI text field or shells such as Fish 4.1+ / Nushell 0.111+ inside Ghostty — would be significantly faster.

Proposal

Enable mouse capture in the TUI and translate click coordinates to cursor positions inside the multiline input widget. Compatible with terminals that support OSC 133 click-events / cl=line or Kitty's click_events.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions