Skip to content
Dashboard

Release held key

client.computers.keyUp(stringid, ComputerKeyUpParams { key, tab_id } body, RequestOptionsoptions?): ActionResult { error_message, executed_tab_id, page_context, 4 more }
POST/computers/{id}/key-up

Release a keyboard key that was previously pressed with key_down. The key name should match the corresponding key_down call.

Key names are case-insensitive: "shift", "Shift", and "SHIFT" all work.

Important: Always release modifier keys after use to prevent them from affecting subsequent actions.

ParametersExpand Collapse
id: string
body: ComputerKeyUpParams { key, tab_id }
key?: string

Key name to release. Case-insensitive. Examples: "shift", "ctrl", "a", "Enter"

tab_id?: string

Optional tab ID for browser sessions (ignored for desktop sessions)

ReturnsExpand Collapse
ActionResult { error_message, executed_tab_id, page_context, 4 more }
error_message?: string
executed_tab_id?: string
page_context?: V2GoBackendInternalTypesPageContext { device_scale_factor, is_main_tab, page_height, 8 more }
device_scale_factor?: number
is_main_tab?: boolean
page_height?: number
page_width?: number
scroll_x?: number
scroll_y?: number
tab_id?: string
title?: string
url?: string
viewport_height?: number
viewport_width?: number
request_id?: string
result?: Record<string, unknown>
status?: string
timestamp?: string

Release held key

import Lightcone from '@tzafon/lightcone';

const client = new Lightcone({
  apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted
});

const actionResult = await client.computers.keyUp('id');

console.log(actionResult.executed_tab_id);
{
  "error_message": "error_message",
  "executed_tab_id": "executed_tab_id",
  "page_context": {
    "device_scale_factor": 0,
    "is_main_tab": true,
    "page_height": 0,
    "page_width": 0,
    "scroll_x": 0,
    "scroll_y": 0,
    "tab_id": "tab_id",
    "title": "title",
    "url": "url",
    "viewport_height": 0,
    "viewport_width": 0
  },
  "request_id": "request_id",
  "result": {
    "foo": "bar"
  },
  "status": "status",
  "timestamp": "timestamp"
}
Returns Examples
{
  "error_message": "error_message",
  "executed_tab_id": "executed_tab_id",
  "page_context": {
    "device_scale_factor": 0,
    "is_main_tab": true,
    "page_height": 0,
    "page_width": 0,
    "scroll_x": 0,
    "scroll_y": 0,
    "tab_id": "tab_id",
    "title": "title",
    "url": "url",
    "viewport_height": 0,
    "viewport_width": 0
  },
  "request_id": "request_id",
  "result": {
    "foo": "bar"
  },
  "status": "status",
  "timestamp": "timestamp"
}