> For the complete documentation index, see [llms.txt](https://docs.orchard.airoverflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orchard.airoverflow.com/cli/driving-a-device/input.md).

# input: tap, swipe, type

Programmatic touch, swipe, type and key presses on a device. Every verb takes a sandbox selector (uuid / uuid-prefix / name / tag) and drives the unified control endpoint.

```bash
orchard input tap      my-pixel 540 1200          # tap at pixel (x, y)
orchard input swipe    my-pixel 540 1600 540 400 --ms 250   # drag (scroll)
orchard input key      my-pixel back              # home / back / recents / power / volup / voldown / enter …
orchard input text     my-pixel "hello@example.com"         # type into the focused field
orchard input tap-text my-pixel "Sign in"         # find an element by label and tap it
orchard input launch   my-pixel com.android.settings       # launch by package / bundle id
orchard input launch-intent my-pixel com.android.settings .Settings   # start an exported activity
orchard input launch-intent my-pixel com.example.app .DeepLink \
  --action android.intent.action.VIEW --data "myapp://open/42" --extra ref=home
```

`launch-intent` is Android only. The activity must be exported, or the device refuses the launch. The component is a relative class (`.Settings`) or a full class name. `--action` and `--data` set the intent; `--extra KEY=VALUE` repeats for string extras.

Coordinates are device pixels. Take a screenshot first to pick them. Use the Android screen (`orchard scrcpy`), or read the display size from `orchard sandbox get`.

`--ms` on `swipe` sets the drag duration (default 300). `--json` on any verb prints the raw agent response instead of a status line. The device receives key names as-is. A bad action or a missing parameter returns an error.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.orchard.airoverflow.com/cli/driving-a-device/input.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
