android_keyevent
Send Android key events such as HOME, BACK, ENTER, APP_SWITCH, or POWER to control a connected device and drive DroidPath automation workflows without screenshot loops.
Instructions
Sends an Android keyevent (e.g. HOME, BACK, ENTER, APP_SWITCH, POWER).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"keycode": "<keycode>"
},
"name": "android_keyevent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keycode | Yes | Key name or integer keycode. | |
| device_serial | No | Optional ADB device serial. Defaults to the first connected device. |