safari_native_keyboard
Sends real OS-level keypresses to the background Safari window without stealing focus, so React trust-gated editors receive isTrusted events when JavaScript key events fail.
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.
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": "safari_native_keyboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name: enter, escape, tab, space, arrow keys, letters, digits, etc. | |
| why | No | Optional short purpose of this step, shown to the user in the cursor's status pill (e.g. 'to save the settings'). The page can read it: never put passwords, codes, card numbers or other private data in it. | |
| receipt | No | Omit it: Daylight has no tab receipts and refuses a call that passes one | |
| modifiers | No | Modifier keys: cmd, shift, alt, ctrl |