press_key
Press specific keys with modifiers like command, shift, option, or control. Optionally focus an app before pressing the key combination.
Instructions
Press a key combo (e.g. press 's' with ['command'] for Cmd+S). Supports a-z, 0-9, return, tab, space, delete, escape, arrows, f1-f12. If app is specified, focuses that app first. Prefer batch_actions when combining with other actions.
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": {
"key": "<key>"
},
"name": "press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name: a-z, 0-9, return, tab, space, delete, escape, up/down/left/right, f1-f12 | |
| modifiers | No | Modifier keys: 'command', 'shift', 'option', 'control' | |
| app | No | App to focus before pressing key (e.g. 'Google Chrome', 'Notes'). |