> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glasswarp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send input

> Native Win32 clicks, typing, keys, drags, and scrolls.

All input is injected as **native Win32 events** on the real machine — not
synthetic browser events.

## Click, type, keys

```python theme={null}
gw.click(sid, x=500, y=400)             # default left button
gw.click(sid, x=500, y=400, button="right")
gw.type_text(sid, "Hello from an agent")
gw.key_press(sid, "Enter")
gw.key_press(sid, "Ctrl+S")
```

## Move and scroll

```python theme={null}
gw.move_mouse(sid, x=640, y=360)
gw.scroll(sid, dx=0, dy=-300)           # scroll down
```

## Drag

Drag draws a continuous path — essential for canvases, sliders, and selection.

```python theme={null}
gw.drag(sid, x1=200, y1=200, x2=600, y2=450)
```

For full control (e.g. multi-segment strokes), use the low-level primitives:

```python theme={null}
gw.mouse_down(sid, x=200, y=200)
gw.move_mouse(sid, x=400, y=300)
gw.move_mouse(sid, x=600, y=450)
gw.mouse_up(sid, x=600, y=450)
```

## Batch events

Send several events in one call to reduce round trips:

```python theme={null}
gw.send_input(sid, events=[...])
```

Events run in order on the host. Optional per-event `delay_ms` gives UIs time
to settle between steps. Each event counts individually against the per-plan
input rate limit (a 10-event batch uses 10 tokens of quota). On agent
**≥ 0.2.21** (`api_input_ack`), the owner kill switch and session end abort an
in-flight batch mid-sequence — the call returns **`410 aborted_by_owner`** with
`executed` / `aborted` / `kill_to_abort_ms` counts (only `executed` events
landed). Older hosts are fire-and-forget.

MCP clients wrap the same endpoint as `send_actions` (max 10 actions, with a
verification observe in the same turn — text and targets by default, JPEG only
when `observe_image=true`) — see [Connect via MCP](/get-started/mcp).

<Tip>
  Prefer [grounded clicks](/concepts/grounding) (`click_target`) over raw
  coordinates whenever the app exposes UIA targets — they're far more robust to
  layout changes.
</Tip>

Next: [Launch apps](/guides/launch-apps).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.