key
Sends button presses or keyboard inputs to Android emulators, Apple simulators, and macOS apps for navigation, text entry, and automated app testing.
Instructions
Press a key or hardware button. Android: up, down, left, right, select, enter, escape, back, home, menu, space, letters, digits. Apple TV (the remote): up, down, left, right, select, menu, playpause, home. iOS: home. Apple Vision Pro: up, down, left, right. mac: arrows, enter, escape, space, tab, letters, digits.
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": {
"device": "<device>",
"key": "<key>"
},
"name": "key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | App id: Android package, Apple bundle identifier; on "mac" the bundle identifier or app name (required there) | |
| key | Yes | ||
| times | No | Press it this many times. Default 1 | |
| device | Yes | Device id (or exact name) from the devices tool | |
| screenshotAfterMs | No | If set, wait this many milliseconds after the action and return a screenshot too |