Skip to content

fix(tui): handle OSC 133 click events in editor#2074

Open
mitsuhiko wants to merge 1 commit intobadlogic:mainfrom
mitsuhiko:osc-133-clicks
Open

fix(tui): handle OSC 133 click events in editor#2074
mitsuhiko wants to merge 1 commit intobadlogic:mainfrom
mitsuhiko:osc-133-clicks

Conversation

@mitsuhiko
Copy link
Contributor

This commit adds editor support for OSC 133 click_events=1 prompt-click (supported by Ghostty and some others) by changing the focused TUI editor to emit click-enabled OSC 133 semantic prompt markers.

This teaches the TUI to parse and dispatch incoming mouse click events to the focused component, and teaching the editor to map those terminal click coordinates back to logical cursor positions across single-line, explicit multi-line, and wrapped inputs.

This is sloppier than I think it could be, but it took me a few attempts to make it work at all.

@badlogic
Copy link
Owner

without asking my clanker, what is this good for?

@mitsuhiko
Copy link
Contributor Author

It lets you click around in the multi-line edit fields to change the cursor position.

@badlogic badlogic added the possibly-openclaw-clanker User has activity on openclaw/openclaw label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

possibly-openclaw-clanker User has activity on openclaw/openclaw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants