Browser Computer Controls

Press one or more keys on the host computer

post/browsers/{id_or_name}/computer/press_key

Request

  • Base URL
    https://api.onkernel.com
  • URL
    https://api.onkernel.com/browsers/{id_or_name}/computer/press_key
  • Auth
    HTTP bearer

Path parameters

id_or_namestring required

Browser session ID or name

Request body

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.

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". Use X11 names for punctuation in combinations, such as "Ctrl+minus" or "Ctrl+plus". A literal hyphen is also accepted as an alias, so "Ctrl+-" is normalized to "Ctrl+minus".

Response

Keys pressed successfully

Changes

No recorded changes to this operation across all 123 revisions of this API.