input_keyevent
Sends Android hardware key events such as HOME, BACK, or numeric keycodes to a device or emulator via ADB, enabling navigation and input control from MCP clients.
Instructions
Send a keyevent (name or code), e.g. KEYCODE_HOME, KEYCODE_BACK, 3, 4.
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": "input_keyevent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | ||
| keycode | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||