Press a key
keyPresses a specified button or character on Android/iOS devices by sending a button name or numeric code.
Instructions
Press one key.
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": "key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | KeyEvent name (HOME, BACK, KEYCODE_7) or code 1-340; "7" is code 7 (KEYCODE_0), not the digit. iOS takes HOME, POWER, VOLUME_UP/DOWN and keyboard keys; an iPhone only keys that type a character, and needs install_runner once. | |
| device | No | Id or name. |