key_event
Send Android keycodes such as HOME, BACK, ENTER, or VOLUME_UP to a device by name or numeric value, enabling automated navigation and control.
Instructions
Send a key event to the device. Supports keycodes like HOME, BACK, ENTER, VOLUME_UP, etc.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "key_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Alias for keycode | |
| serial | No | Device serial number | |
| keycode | No | Keycode name (e.g., 'HOME', 'BACK') or numeric value |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Human-readable description of the action performed | |
| success | Yes | Whether the input action was dispatched to the device |