adb_press_key
Press Android keycodes like HOME, BACK, or VOLUME on a connected device via ADB. Specify the keycode number to trigger device actions for automation.
Instructions
Press a key on the device (using Android keycode)
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": "adb_press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keycode | Yes | Android keycode (e.g., 3=HOME, 4=BACK, 24=VOLUME_UP, 25=VOLUME_DOWN) | |
| deviceId | No | Target device ID (optional) |