device_key
Send a keycode to a device. Accepts numeric keycode OR named key (HOME, BACK, ENTER, VOLUME_UP, VOLUME_DOWN, POWER, APP_SWITCH, ESCAPE, DELETE, TAB, SEARCH, MENU). System-policy keys (APP_SWITCH/187, MENU/82, POWER/26) are always sent via shell — they require policy-level handling that the control channel cannot reach. Other keys try the control channel first and fall back to shell on error/timeout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Device serial number (UDID) | |
| keycode | Yes | Android keycode number OR name (HOME, BACK, ENTER, VOLUME_UP, VOLUME_DOWN, POWER, APP_SWITCH, ESCAPE, DELETE, TAB, SEARCH, MENU) |