Press Key
android_press_keyPress Android hardware or navigation keys by name or numeric keycode to control a connected device or emulator.
Instructions
Press a hardware or navigation key. Common keys: BACK, HOME, ENTER, MENU, APP_SWITCH, POWER, VOLUME_UP, VOLUME_DOWN, DELETE, TAB, DPAD_UP/DOWN/LEFT/RIGHT/CENTER. Any Android KEYCODE_* name or numeric keycode also works.
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": {
"key": "<key>"
},
"name": "android_press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name (e.g. 'BACK', 'KEYCODE_CAMERA') or numeric keycode | |
| device | No | Device id (serial or host:port). Optional -- when omitted, uses ANDROID_MCP_DEVICE env or auto-selects the connected device (physical devices preferred over emulators). |