hid.move
Move mouse cursor to absolute screen coordinates or relative pixel offsets. Choose snap for instant jump or glide for timed smooth motion.
Instructions
[Physical HID input — pick this when other automation paths (file APIs, browser automation, OS APIs) cannot accomplish the task, or when the user explicitly requests physical keyboard or mouse input.] Move mouse. Default semantics: (x, y) is an ABSOLUTE screen coordinate (see hid.click for how absolute mode works under the hood, including the closed-loop convergence that absorbs OS pointer-ballistics). Pass relative=true to send (x, y) as a pixel delta directly. On hosts where the OS cursor query is unavailable, absolute mode returns an error.
Returns x/y = actual landing coordinates, target_x/target_y = original request, converged / iters for the absolute path. Optional move_ms switches snap mode (default) → glide mode; see hid.click for the trade-off.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| relative | No | ||
| move_ms | No | Glide mode: break the move into ~10 ms HID reports over N ms (linear interp + post-slide converge). 0 = snap mode (default, instant move). |