Hold keys
hold_keysHold keys down for a specified duration, then release them, to perform gestures that require a key to remain pressed while time passes.
Instructions
Hold keys down for a duration in seconds (0-100), then release them all before the call returns (also on error). For a single chord use press_keys; this is for gestures that need a key held while time passes.
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": {
"target": "<target>",
"keys": "<keys>",
"duration": "<duration>"
},
"name": "hold_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | Key chord, e.g. "ctrl+s", "enter", "ctrl+shift+p", or ["ctrl","s"]. | |
| target | Yes | Window id from list_windows (a "window:<id>" prefix is accepted), "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard. | |
| duration | Yes | Seconds to hold, 0 to 100. | |
| takeover | No | Omit to follow the plugin setting ("prefer" uses real input first, "fallback" tries background input first, "refuse" disables takeover). Use true for reliable input in Chromium (including Brave), Electron, and terminal hosts when takeover is allowed. Takeover brings the window forward and can interrupt the user. For window targets, use false to request background-only input; desktop and display targets send real input. |