hid.drag
Hold a mouse button down and glide from one screen coordinate to another, releasing at the destination. Enables drag-and-drop operations in design or file management that require real physical input.
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.] Drag from (from_x, from_y) to (to_x, to_y) while holding the named button. Internally: absolute move to source → mouse_button_down → glided absolute move to destination → mouse_button_up. Matches Anthropic Computer Use's left_click_drag action. Useful for design / spreadsheet / file-manager workflows where 'press → drag → release' is the atomic UI gesture.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_x | Yes | ||
| from_y | Yes | ||
| to_x | Yes | ||
| to_y | Yes | ||
| button | No | left | |
| move_ms | No | Duration of the held-button move from source to destination. | |
| relative | No | If true, from_x/y and to_x/y are pixel deltas, not absolute coords. |