Kibotos
API 参考kibotos.ctrl.v1

DesktopService

本页列出 kibotos.ctrl.v1 中 DesktopService 的方法及每个方法用到的消息与枚举,由 ctrl.proto 及其注释生成,注释保持英文。多个服务共用的消息与枚举见 kibotos.ctrl.v1 类型。

node 数据面在数据面会话的 endpoint 上调用,凭证放在 Authorization: Bearer。调用方式

DesktopService captures the Workspace desktop and delivers pointer and keyboard input to it. Every call requires a data-plane bearer credential with DESKTOP scope. The desktop is shared with whoever is watching it through a service connection: these operations neither take control from a viewer nor hand control to one. A Workspace whose desktop is not ready fails every call here and never waits for readiness.

Screenshot

POST/kibotos.ctrl.v1.DesktopService/Screenshot一元调用
请求ScreenshotRequest

无字段。

响应ScreenshotResponse

ScreenshotResponse always carries an image captured for this call. A capture that fails is a failure result; an earlier frame is never returned instead.

ScreenshotFormat

  • SCREENSHOT_FORMAT_UNSPECIFIED= 0
  • SCREENSHOT_FORMAT_PNG= 1

PerformActions

POST/kibotos.ctrl.v1.DesktopService/PerformActions一元调用
请求PerformActionsRequest

PerformActionsRequest is validated as a whole before anything is delivered, and the actions are delivered in order. Whatever they leave held is released when the call ends, including when the caller aborts it: input state belongs to one call and never outlives it.

响应PerformActionsResponse

ScreenPosition

ScreenPosition counts screen pixels from the top left corner. Where an action below leaves it absent, the pointer stays where it already is.

  • xuint32= 1
  • yuint32= 2

MovePointer

ClickPointer

count is 1 for a single click and 2 for a double click.

PressPointer

ReleasePointer

ScrollPointer

amount counts scroll steps, each one wheel notch.

PressKeys

PressKeys is one chord: the keys are held in the order given and released in the reverse order. Each name is a controlled key name of this contract, not a keycode and not a command line.

  • keysrepeatedstring= 1

TypeText

TypeText types UTF-8 text character by character. Characters the desktop keyboard layout cannot produce are placed on spare keycodes for the duration of the call, so the layout is back to what it was when the call ends. Every remapping is a round trip the desktop applications have to notice: long text, or text with many distinct characters, belongs in WriteClipboard.

WriteClipboard

WriteClipboard makes the UTF-8 text the content of the desktop clipboard, so a paste chord later in the same request receives it. Any application that copies afterwards takes the clipboard over, so the content is not promised to survive past the request that wrote it.

WaitInput

DesktopAction

PointerButton

  • POINTER_BUTTON_UNSPECIFIED= 0
  • POINTER_BUTTON_LEFT= 1
  • POINTER_BUTTON_MIDDLE= 2
  • POINTER_BUTTON_RIGHT= 3

ScrollDirection

  • SCROLL_DIRECTION_UNSPECIFIED= 0
  • SCROLL_DIRECTION_UP= 1
  • SCROLL_DIRECTION_DOWN= 2
  • SCROLL_DIRECTION_LEFT= 3
  • SCROLL_DIRECTION_RIGHT= 4

本页内容