key
Press a key or key combination (e.g., 'return', 'cmd+a') on macOS. Optionally repeat the press multiple times.
Instructions
Press a key or key combination (e.g. "return", "escape", "cmd+a", "ctrl+shift+tab"). 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 (quit app, switch app, lock screen) require the systemKeyCombos grant — without it they return an error. All other combos work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Modifiers joined with "+", e.g. "cmd+shift+a". | |
| repeat | No | Number of times to repeat the key press. Default is 1. |