hold_key
Press and hold a key or key combination for a specified duration, then release. Works with frontmost allowed applications and system-level combos with proper grants.
Instructions
Press and hold a key or key combination for the specified duration, then release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos require the systemKeyCombos grant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Key or chord to hold, e.g. "space", "shift+down". | |
| duration | Yes | Duration in seconds (0–100). |