input
Simulate taps, long presses, swipes, text entry, and key presses on Waydroid displays to control Android apps, targeting coordinates or UI elements for automated testing and debugging.
Instructions
Touch and keyboard input on a display, in display pixels. tap and long_press take x and y, or element: text, description or resource id to find in the UI tree. swipe goes from x,y to x2,y2 (swipe up to scroll down). text types into the focused field, so tap the field first; key sends a key such as BACK, ENTER, TAB, HOME or DEL.
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": {
"action": "<action>"
},
"name": "input"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| x2 | No | ||
| y2 | No | ||
| key | No | ||
| text | No | ||
| action | Yes | ||
| element | No | For tap and long_press: element text, content description or resource id. | |
| package | No | App to act on. An app in its own window or hidden display is found by package; otherwise Waydroid's main display is used. | |
| display_id | No | Android display id instead of a package; 0 is Waydroid's main display. | |
| duration_ms | No | Swipe or long-press length. Defaults: 300 and 800. |