button
Press supported hardware keys (home, back, power, volumeUp, volumeDown, appSwitch, actionButton) on an iOS simulator or Android emulator. Returns the pressed key name.
Instructions
Press a device hardware button (iOS simulator or Android emulator). Sends Down then Up events automatically. Supported buttons depend on the platform: home, back, power, volumeUp, volumeDown, appSwitch, actionButton — buttons not present on the target platform (e.g. 'back' on iOS, 'actionButton' on Android) are rejected with a clear error. Use when you need to trigger hardware button events. Returns { pressed: buttonName }. Fails if the simulator-server / emulator backend is not reachable for the given device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Target device id from `list-devices` (iOS UDID or Android serial). | |
| button | Yes | Hardware button to press |