send_keyevent
Simulate Android hardware keys like Back, Home, and Power on connected devices. Send keyevent codes to control navigation and system functions.
Instructions
Send a keyevent (hardware/system key simulation) to the device (e.g. BACK=4, HOME=3, POWER=26, APP_SWITCH=187).
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": "send_keyevent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Specific device serial number | |
| keycode | Yes | The Android keyevent integer code (e.g., Back=4, Home=3, Power=26, Tab=61, Enter=66) |