iOS press button
ios_press_buttonPress a hardware or keyboard button on an iOS device. Hardware: home, volumeUp, volumeDown. Keyboard submit: return, go, done, search. Editing: backspace (delete-left), delete (delete-right alias — iOS soft keyboard treats both the same in most contexts). Whitespace: tab. home is the Home BUTTON: it goes to the Home screen and leaves whatever app was open. To wake the device or clear a Lock Screen WITHOUT leaving the app, use ios_unlock or the keyboard Home key (ios_key_hid with usages [74]) instead. (On an Apple TV, press remote keys with ios_tv_button and change volume with ios_tv_volume — the hardware/keyboard buttons here are unavailable there.) Works without an automation session when the direct input path is available; falls back to one otherwise (see input). Note: for reliable backspace, ensure the soft keyboard is actually raised (visible) before pressing — a tap that visually focuses a field may not yet have raised the keyboard, in which case key events are dropped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | iOS device UDID | |
| input | No | Input path. 'auto' (default) tries the direct input path first — the one that needs no automation session — and falls back to the session only when the direct path is not usable right now (the response says which one ran). On a device set to direct-input-only, an unusable direct path is reported as an error instead of silently switching to the session. 'hid' forces the direct path with no fallback, reporting 'no HID available' on iOS 17.x or with no tunnel. 'session' forces the automation session even when the direct path would have worked. | |
| button | Yes | Button name: home, volumeUp, volumeDown, return, go, done, search, backspace, delete, tab |