key_event
Send Android key events over ADB to press buttons like home, back, volume, power, or enter a numeric keycode. Use it to control device navigation and hardware keys.
Instructions
Send a key event. Names: home, back, call, endcall, up, down, left, right, center, volume_up, volume_down, power, camera, tab, enter, delete, menu, search, play_pause, mute, recents, app_switch, wakeup, sleep; or a numeric keycode
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| serial | No | Device serial (optional; defaults to first ADB_SERIAL entry or the only connected device) |