press_key
Press a single key or key combination in the active application, with optional modifiers like Command or Shift. Supports characters and named keys such as Return, Tab, Escape, and function keys.
Instructions
Press a single key, optionally with modifiers, in the frontmost application. Accepts any single character, or a named key: return, enter, tab, space, delete, escape, up, down, left, right, home, end, page_up, page_down, f1-f12. Requires Accessibility permission. To enter text use type_text instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name or single character (e.g. "return", "tab", "c", "f5"). | |
| modifiers | No | Modifier keys. |