Skip to content

Send low-level input events — mouse clicks, keyboard keys, drags, scrolls, and window management commands — to a connected display host. These endpoints let you automate GUI interactions, query display and window state, and manage windows programmatically. Every endpoint targets a single display, identified either by the *-display-N.* hostname pattern or the displayId query parameter.

GET /api/v1/display/input/display-geometry

Section titled “GET /api/v1/display/input/display-geometry”

Get the dimensions of the display (width, height, and screen index).

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
Terminal window
curl -X GET "https://display.local/api/v1/display/input/display-geometry?displayId=1"

Get the current cursor position, including the screen index and window under the cursor.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1-999999
Terminal window
curl -X GET "https://display.local/api/v1/display/mouse/location?displayId=1"

GET /api/v1/display/window/{windowId}/geometry

Section titled “GET /api/v1/display/window/{windowId}/geometry”

Get the position and size of a specific window.

NameInTypeRequiredDescription
windowIdpathstringYesWindow ID (decimal or hex).
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
Terminal window
curl -X GET "https://display.local/api/v1/display/window/0x80010/geometry?displayId=1"

GET /api/v1/display/window/{windowId}/name

Section titled “GET /api/v1/display/window/{windowId}/name”

Get the title of a specific window.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1-999999
windowIdpathstringYesWindow ID (decimal or hex)
Terminal window
curl -X GET "https://display.local/api/v1/display/window/0x80010/name?displayId=1"

Get the ID of the currently focused (active) window.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
Terminal window
curl -X GET "https://display.local/api/v1/display/window/active?displayId=1"

Execute a single named action (e.g. mouse/click, keyboard/type) with an optional post-action screenshot.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1-999999
FieldTypeRequiredDescription
actionstringYesAction path (e.g. mouse/click, keyboard/type). Max length: 50.
paramsobjectNoAction-specific parameters. Default: {}.
screenshotbooleanNoCapture screenshot after action. Default: true.
screenshotDelayintegerNoDelay before screenshot in milliseconds. Range: 0–5000. Default: 100.
screenshotRegionstringNoCrop region in format x1,y1,x2,y2. Pattern: ^\d+,\d+,\d+,\d+$. Max length: 40.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/act?displayId=1" \
-H "Content-Type: application/json" \
-d '{
"action": "mouse/click",
"params": { "x": 540, "y": 320, "button": 1 },
"screenshot": true
}'

Execute a sequence of actions in order. Returns per-action results for completed, failed, and skipped actions.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
actionsarrayYesArray of actions to execute. 1–50 items.
actions[].actionstringYesAction path (e.g. mouse/click, keyboard/type).
actions[].paramsobjectNoAction-specific parameters.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/batch?displayId=1" \
-H "Content-Type: application/json" \
-d '{
"actions": [
{ "action": "mouse/click", "params": { "x": 100, "y": 200 } },
{ "action": "keyboard/type", "params": { "text": "hello" } },
{ "action": "keyboard/key", "params": { "keys": ["Return"] } }
]
}'

Move the cursor to a position and click a mouse button in a single operation.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
xintegerYesX coordinate.
yintegerYesY coordinate.
buttonintegerNoMouse button (1=left, 2=middle, 3=right, 4–7=extra). Default: 1.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/click-at?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "x": 540, "y": 320, "button": 1 }'

Drag from a start position to an end position with optional step count for smooth movement.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
startXintegerYesStarting X coordinate.
startYintegerYesStarting Y coordinate.
endXintegerYesEnding X coordinate.
endYintegerYesEnding Y coordinate.
buttonintegerNoMouse button (1=left, 2=middle, 3=right, 4–7=extra). Default: 1.
stepsintegerNoNumber of intermediate mouse positions for smooth drag. Range: 1–1000.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/drag?displayId=1" \
-H "Content-Type: application/json" \
-d '{
"startX": 100,
"startY": 200,
"endX": 500,
"endY": 200,
"steps": 20
}'

Emergency release all held inputs — releases any keys or mouse buttons currently held down. No request body.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/reset?displayId=1"

Select a range by clicking at a start position and shift-clicking at an end position.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1-999999
FieldTypeRequiredDescription
xintegerYesStart X coordinate.
yintegerYesStart Y coordinate.
endXintegerYesEnd X coordinate.
endYintegerYesEnd Y coordinate.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/select?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "x": 200, "y": 300, "endX": 600, "endY": 300 }'

Move the cursor to a position, click, and type text in one operation.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
xintegerYesX coordinate to click.
yintegerYesY coordinate to click.
textstringYesText to type. Max length: 10000.
delayintegerNoInter-keystroke delay in milliseconds. Range: 0–1000.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/type-at?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "x": 540, "y": 320, "text": "user@example.com", "delay": 10 }'

Wait for a specified duration, with an optional screenshot capture after the wait.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
msintegerYesWait duration in milliseconds. Range: 50–30000.
screenshotbooleanNoCapture screenshot after wait. Default: false.
Terminal window
curl -X POST "https://display.local/api/v1/display/input/wait?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "ms": 2000, "screenshot": true }'

Press one or more key combinations (e.g. ctrl+c, Return). Keys are pressed and released sequentially.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
keysarrayYesKey combinations (e.g. ["ctrl+c", "Return"]). 1–20 items. Each max length: 100.
windowinteger | stringNoTarget window ID.
delayintegerNoDelay between keys in milliseconds. Range: 0–5000.
clearModifiersbooleanNoClear modifier keys before pressing.
Terminal window
curl -X POST "https://display.local/api/v1/display/keyboard/key?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "keys": ["ctrl+c"] }'

Press and hold a key. Use the matching key-up endpoint to release it, or set holdMs for auto-release.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
keystringYesKey name (X11 keysym, e.g. Shift_L, ctrl). Max length: 100.
windowinteger | stringNoTarget window ID.
holdMsintegerNoAuto-release after this many milliseconds. Range: 100–60000.
Terminal window
curl -X POST "https://display.local/api/v1/display/keyboard/key-down?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "key": "Shift_L", "holdMs": 3000 }'

Release a previously held key.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
keystringYesKey name (X11 keysym). Max length: 100.
windowinteger | stringNoTarget window ID.
Terminal window
curl -X POST "https://display.local/api/v1/display/keyboard/key-up?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "key": "Shift_L" }'

Type a string of text, sending each character as a keystroke.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
textstringYesText to type. Max length: 10000.
windowinteger | stringNoTarget window ID.
delayintegerNoInter-keystroke delay in milliseconds. Range: 0–1000.
clearModifiersbooleanNoClear modifier keys before typing.
Terminal window
curl -X POST "https://display.local/api/v1/display/keyboard/type?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "text": "Hello, world!", "delay": 5 }'

Click a mouse button at the current cursor position, optionally repeating with a delay.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
buttonintegerNoMouse button (1=left, 2=middle, 3=right, 4–7=extra). Default: 1.
repeatintegerNoNumber of times to repeat the click. Range: 1–100. Default: 1.
delayintegerNoDelay between repeats in milliseconds. Range: 0–5000.
windowinteger | stringNoTarget window ID (decimal or hex 0x...).
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/click?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "button": 1, "repeat": 1 }'

Double-click a mouse button at the current cursor position.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
buttonintegerNoMouse button. Range: 1–7. Default: 1.
windowinteger | stringNoTarget window ID.
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/double-click?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "button": 1 }'

Press and hold a mouse button. Use the matching mouse/up endpoint to release it, or set holdMs for auto-release.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
buttonintegerNoMouse button. Range: 1–7. Default: 1.
windowinteger | stringNoTarget window ID.
holdMsintegerNoAuto-release after this many milliseconds. Range: 100–60000.
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/down?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "button": 1, "holdMs": 5000 }'

Move the cursor to an absolute position on the display.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
xintegerYesTarget X coordinate. Range: -65535 to 65535.
yintegerYesTarget Y coordinate. Range: -65535 to 65535.
windowinteger | stringNoTarget window ID.
screenintegerNoScreen index. Range: 0–15.
syncbooleanNoSynchronize the move event.
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/move?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "x": 540, "y": 320 }'

Move the cursor by a relative offset from its current position.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
xintegerYesHorizontal offset in pixels.
yintegerYesVertical offset in pixels.
syncbooleanNoSynchronize the move event.
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/move-relative?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "x": 50, "y": -20 }'

Scroll in a specified direction with a configurable number of click units.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
directionstringYesScroll direction. One of: up, down, left, right.
clicksintegerNoNumber of scroll click units. Range: 1–100. Default: 5.
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/scroll?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "direction": "down", "clicks": 3 }'

Release a previously held mouse button.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
buttonintegerNoMouse button. Range: 1–7. Default: 1.
windowinteger | stringNoTarget window ID.
Terminal window
curl -X POST "https://display.local/api/v1/display/mouse/up?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "button": 1 }'

Close a window by its ID.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
windowIdinteger | stringYesWindow ID (decimal or hex 0x...).
Terminal window
curl -X POST "https://display.local/api/v1/display/window/close?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "windowId": "0x80010" }'

Focus (activate) a window by its ID, bringing it to the foreground.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
windowIdinteger | stringYesWindow ID (decimal or hex 0x...).
Terminal window
curl -X POST "https://display.local/api/v1/display/window/focus?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "windowId": "0x80010" }'

Minimize (iconify) a window by its ID.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
windowIdinteger | stringYesWindow ID (decimal or hex 0x...).
Terminal window
curl -X POST "https://display.local/api/v1/display/window/minimize?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "windowId": "0x80010" }'

Move a window to a new position. Use relative: true to move by an offset from the current position.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
windowIdinteger | stringYesWindow ID (decimal or hex 0x...).
xintegerYesTarget X coordinate (or relative offset if relative is true).
yintegerYesTarget Y coordinate (or relative offset if relative is true).
syncbooleanNoSynchronize the move event.
relativebooleanNoInterpret x and y as relative offsets.
Terminal window
curl -X POST "https://display.local/api/v1/display/window/move?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "windowId": "0x80010", "x": 100, "y": 50 }'

Raise a window to the top of the stacking order so it appears above other windows.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
windowIdinteger | stringYesWindow ID (decimal or hex 0x...).
Terminal window
curl -X POST "https://display.local/api/v1/display/window/raise?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "windowId": "0x80010" }'

Resize a window to a specific width and height.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
windowIdinteger | stringYesWindow ID (decimal or hex 0x...).
widthintegerYesTarget width in pixels. Minimum: 0.
heightintegerYesTarget height in pixels. Minimum: 0.
syncbooleanNoSynchronize the resize event.
useHintsbooleanNoUse X11 size hints when resizing.
Terminal window
curl -X POST "https://display.local/api/v1/display/window/resize?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "windowId": "0x80010", "width": 1024, "height": 768 }'

Search for windows by a regex pattern matched against window name, class, or classname.

NameInTypeRequiredDescription
displayIdqueryintegerNoDisplay ID to use (overrides the *-display-N.* hostname pattern). Valid range: 1–999999.
FieldTypeRequiredDescription
patternstringYesSearch pattern (regex). Max length: 200.
namebooleanNoSearch by window name/title.
classbooleanNoSearch by window class.
classnamebooleanNoSearch by window classname.
onlyVisiblebooleanNoOnly return visible windows.
Terminal window
curl -X POST "https://display.local/api/v1/display/window/search?displayId=1" \
-H "Content-Type: application/json" \
-d '{ "pattern": "Terminal", "name": true, "onlyVisible": true }'