Click
clickSimulate mouse button presses at absolute coordinates or window-relative positions to control GUI apps in nested X11/Wayland displays; configure button, count, and hold duration.
Instructions
Clicks a mouse button, optionally at absolute output coordinates (or window-relative with relative=true). Uses XTest for X11 targets and the virtual pointer for Wayland targets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| id | No | Display id from display_open. Optional when exactly one display is open. | |
| count | No | ||
| button | No | left | |
| hold_ms | No | How long to hold the button down. Polling UIs (raylib/GLFW, SDL) miss atomic clicks, so this defaults to 100ms. | |
| relative | No | ||
| window_id | No |