mcpretentious-mouse
Send mouse events (press, release, drag) to a terminal using SGR protocol. Control cursor position, button clicks, and scroll actions with optional modifier keys.
Instructions
Send mouse events to a terminal using SGR mouse protocol.
This tool provides direct control over mouse events following the terminal's SGR (Select Graphic Rendition) mouse protocol.
EVENTS:
- 'press': Mouse button press event
- 'release': Mouse button release event
- 'drag': Mouse movement with button held down
BUTTONS (use names or button-N format):
Named buttons:
- 'left': Left mouse button
- 'middle': Middle mouse button
- 'right': Right mouse button
- 'scrollUp': Scroll wheel up
- 'scrollDown': Scroll wheel down
Direct button codes:
- 'button-0' through 'button-127': Direct SGR button codes
- Common codes: 0=left, 1=middle, 2=right, 64=scrollUp, 65=scrollDown
MODIFIERS (optional, default to false):
- shift: Hold shift key during event
- alt: Hold alt/option key during event
- ctrl: Hold control key during event
COORDINATES:
- x and y are 0-based character positions (column, row)
- The protocol will convert to 1-based coordinates internally
EXAMPLES:
- Left click at (10,5): event='press', button='left', x=10, y=5, then event='release' with same coordinates
- Drag from (5,5) to (15,10): event='press' at (5,5), event='drag' at (15,10), event='release' at (15,10)
- Scroll up at (20,8): event='press', button='scrollUp', x=20, y=8 (no release needed for scroll)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terminalId | Yes | The terminal ID to send mouse events to | |
| event | Yes | Mouse event type: 'press' for button down, 'release' for button up, 'drag' for movement with button held | |
| x | Yes | X coordinate (column position, 0-based) | |
| y | Yes | Y coordinate (row position, 0-based) | |
| button | Yes | Mouse button: named ('left', 'middle', 'right', 'scrollUp', 'scrollDown') or direct code ('button-0' through 'button-127') | |
| shift | No | Shift key modifier | |
| alt | No | Alt/Option key modifier | |
| ctrl | No | Control key modifier |