Feature Request: Mouse click-to-position cursor in text input

Resolved 💬 2 comments Opened Mar 8, 2026 by tommyroar Closed Apr 5, 2026

Feature Request: Mouse click-to-position cursor in text input

Description

Clicking with the mouse to reposition the cursor in the text input does not work in Claude Code, while it works in other CLI AI tools (e.g. Gemini CLI).

Root Cause (as understood)

Claude Code's UI framework (Ink) enables terminal mouse reporting mode (\033[?1000h), which causes the terminal emulator to hand all mouse events to the application. However, the text input component does not translate those mouse click events into cursor position changes. As a result, clicking in the input field has no effect on cursor position.

Expected Behavior

Clicking anywhere in the current input text should move the cursor to the clicked position, matching standard terminal and editor behavior.

Actual Behavior

Mouse clicks in the input area are ignored for cursor positioning. The user must rely entirely on keyboard navigation (arrow keys, Ctrl+A/E, etc.).

Suggested Fix

In the text input component, handle mouse click events and calculate the corresponding cursor position based on click coordinates, then move the cursor accordingly — similar to how Gemini CLI or readline-based CLIs handle this.

Impact

This is a frequent friction point when editing longer prompts. Click-to-position is a basic UX expectation for any text input field.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗