> ## 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=[...])
```

<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).
