v44

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0156121143.5 KB

Press one or more keys on the host computer

Presses the specified keys for an optional duration. Keys should be key symbols supported by xdotool. For a comprehensive list of key symbols, see the X11 keysym definitions at https://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h The server honors millisecond-level durations using fractional sleeps under the hood.

post/computer/press_key

Request body

keysstring[] required

List of key symbols to press. Each item should be a key symbol supported by xdotool (see X11 keysym definitions). Examples include "Return", "Shift", "Ctrl", "Alt", "F5". Items in this list could also be combinations, e.g. "Ctrl+t" or "Ctrl+Shift+Tab".

durationinteger

Duration to hold the keys down in milliseconds. If omitted or 0, keys are tapped.

hold_keysstring[]

Optional modifier keys to hold during the key press sequence.

Response

Keys pressed successfully