Ui Keystroke
ui_keystrokeSends a key combination, e.g. "cmd+shift+5", "return", "cmd+,", "escape". Modifiers: cmd, shift, alt/option, ctrl, fn. The last token is the key. Returns {sent, delivery:"posted_not_confirmed"} — sent means the key events were POSTED, NOT that the app acted on them: CGEvent carries no delivery confirmation, and a keystroke's effect is arbitrary so nothing can be read back to prove it. Confirm the effect with ui_get_element / ui_read_tree rather than trusting sent. Modifiers are released after the combo, so a following ui_type is not swallowed. unknown_key if the key isn't recognized. Requires Accessibility permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | e.g. cmd+shift+5, return, cmd+, |