Send a keyevent on the device
android.input.keyeventSend keycode events to Android devices for remote control, using scrcpy protocol when available or ADB as fallback. Simulate actions like HOME, BACK, VOLUME, POWER, and ENTER.
Instructions
Sends a keycode event. Uses fast scrcpy control protocol when stream is active, otherwise falls back to adb shell input keyevent. Common keycodes: HOME=3, BACK=4, VOLUME_UP=24, VOLUME_DOWN=25, POWER=26, ENTER=66, DELETE=67.
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": {
"serial": "<serial>",
"keycode": "<keycode>"
},
"name": "android.input.keyevent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | Yes | ||
| keycode | Yes |