press_key
Send Android system or virtual key events such as Back, Home, Recents, Enter, and Power/Wake, then optionally return the latest UI hierarchy for the next action.
Instructions
发送系统物理/虚拟按键(返回、主页、多任务、回车、电源唤醒等),并自动返回最新界面结构。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 按键名称或代码:'BACK'、'HOME'、'APP_SWITCH'、'ENTER'、'DEL'、'VOLUME_UP'、'VOLUME_DOWN'、'POWER'、'WAKEUP'、'SLEEP' | BACK |
| wait_after_ms | No | 按键后等待毫秒数,默认 0 | |
| return_ui_after | No | 按键后是否附带完整 UI 树。默认 False——按返回键后通常只需知道动作已送达,需要时再 ui_snapshot |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |