hid.hold_key
Hold a key for a specified duration to perform actions like scrolling or panning, where a single tap is insufficient.
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.] Press a key, wait duration_ms, then release. Matches Anthropic Computer Use's hold_key action. Useful for scenarios where a single tap is too short — e.g. holding an arrow key to scroll a long list, or holding Space to pan in a design app.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| duration_ms | No | ||
| modifiers | No |