Hold Key
hold_keyHold a keyboard key or chord for up to 30 seconds to simulate sustained input on macOS.
Instructions
Hold a key or chord for up to 30 seconds.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>",
"duration": "<duration>"
},
"name": "hold_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Key or chord. | |
| app_ref | No | ||
| duration | Yes | Duration in seconds. | |
| strategy | No | Prefer accessibility, require accessibility, or require event dispatch. | auto |
| return_state | No | Optionally observe the target again after the action. | none |