---
title: "Touch, key, text, scroll, clipboard, rotate (needs a live stream session)"
method: POST
path: "/devices/{name}/input"
tags: ["Screen and input"]
---

# Touch, key, text, scroll, clipboard, rotate (needs a live stream session)

`POST /devices/{name}/input`

## Request

- Base URL: `https://api.clousd.com/v1`
- URL: `https://api.clousd.com/v1/devices/{name}/input`
- Auth: HTTP bearer

Same messages as the stream's input data channel. text types ASCII with key events and pastes anything else (Cyrillic, CJK, long text) through the clipboard; scroll is a mouse wheel at x,y with dx/dy as fractions of one notch in [-1, 1]; paste puts s into the phone clipboard and pastes it; clip only sets the clipboard; clipboard asks for the phone clipboard - the text comes back to the viewer over the data channel as {t: clipboard, s}.

## Request body

- object
  - `t` 'touch' | 'key' | 'text' | 'scroll' | 'paste' | 'clip' | 'clipboard' | 'rotate'
  - `a` integer: touch/key: 0 down, 1 up, 2 move
  - `x` number
  - `y` number
  - `p` integer: pointer id (-1 = mouse)
  - `code` integer: Android key code
  - `s` string: text (text
  - `dx` number: scroll: horizontal notches, -1..1
  - `dy` number: scroll: vertical notches, -1..1 (positive = up)

## Response `200`

Applied

## Other responses

- `409`: Error

---

[API](https://skmtc.dev/clousd/apis/clousd-api.md) · [All operations](https://skmtc.dev/clousd/apis/clousd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clousd/apis/clousd-api/revisions/0291ffd26ae3?raw)
