adb_key_event
Send key events such as HOME, BACK, or ENTER to an Android device to navigate menus, dismiss screens, or trigger actions during automated testing.
Instructions
Send a key event (e.g., HOME, BACK, ENTER) to the device.
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_key_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keycode | Yes | Key code or name (e.g., KEYCODE_HOME, 3, BACK, ENTER) | |
| deviceId | No |