press_key
Simulate hardware or software key presses (BACK, HOME, ENTER, etc.) to control a mobile device during UI tests.
Instructions
Press a hardware/software key (BACK, HOME, ENTER, MENU, etc.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name: BACK, HOME, ENTER, MENU, POWER, VOLUME_UP, VOLUME_DOWN, TAB, DELETE, DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT, DPAD_CENTER, etc. | |
| device_id | No | Target device ID. If omitted, uses the default device. |