key_event
Send any Android keycode (e.g., KEYCODE_ESCAPE or 66) to control keys not covered by press_button. Specify the keycode and optional device serial to trigger the input.
Instructions
Send any Android keycode (e.g. KEYCODE_ESCAPE, 66) — for keys not covered by press_button
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": "key_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Device serial (e.g. emulator-5554). Optional when exactly one device is connected. | |
| keycode | Yes |