terminal.mouse_click
Send a mouse click event to a terminal session at specified coordinates, enabling interaction with TUI programs like vim and lazygit.
Instructions
Click the mouse at a specific position in the terminal. Sends SGR-1006 press+release sequences that interactive TUI programs (vim, lazygit, htop, etc.) understand. The child process must have mouse mode enabled for clicks to take effect. Coordinates are 1-based: (1,1) is top-left corner.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID from terminal.start — use exact value | |
| col | Yes | 1-based column (x position, left=1) | |
| row | Yes | 1-based row (y position, top=1) | |
| button | No | Mouse button | left |
| shift | No | Shift key held | |
| alt | No | Alt key held | |
| ctrl | No | Ctrl key held |