safari_native_keyboard
Send real keyboard events to Safari without activating the window, bypassing JavaScript limitations for React trust-gated inputs like Discord Enter or Slack send. Supports keys and modifiers, runs entirely in background.
Instructions
OS-level keyboard event via macOS CGEvent — sends a real keypress (with optional modifiers) to the Safari window WITHOUT activating Safari or stealing focus. Use when safari_press_key's JS path doesn't reach React trust-gated handlers (Discord ProseMirror Enter, Slack send, virtualized editors). Keys: enter, return, tab, escape, space, delete, backspace, up/down/left/right, home, end, pageup, pagedown, f1-f6, a-z, 0-9 and common punctuation. Modifiers: cmd, shift, alt, ctrl. Produces isTrusted:true events. Never activates Safari — runs entirely in the background.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name: enter, escape, tab, space, arrow keys, letters, digits, etc. | |
| modifiers | No | Modifier keys: cmd, shift, alt, ctrl |