Press a key
key_pressPress any keyboard key, including return, tab, escape, arrows, or characters, with optional command, option, control, or shift modifiers to trigger actions and shortcuts in macOS.
Instructions
Press a key (e.g. return, tab, escape, arrows, or a character) with optional modifiers (command/option/control/shift). Requires admin mode AND MACCTL_ALLOW_INPUT=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name (return, tab, escape, up…) or a single character. | |
| modifiers | No | Modifier keys to hold. |