/// /** * Commands sent to server are a 16-bit LE followed by optional arguments * The 8 upper bits seem to have flags. */ export declare function formatCommand(command: number, args?: Uint8Array): Buffer; export declare enum Command { /** * negotiate a remote console connection. argument is a 32-byte * session key in hex, optionally encrypted, see [negotiateConnection] */ RC_CONNECT = 8193, /** * negotiate a command connection. argument is a 32-byte * session key in hex, optionally encrypted, see [negotiateConnection] */ CMD_CONNECT = 8194, /** seize the session from the other user. no arguments */ SEIZE_CONNECTION = 85, /** share the session with the other user. no arguments */ SHARE_CONNECTION = 86, /** power button / status command. argument is u16, see [[powerStatusCommands]] */ POWER_STATUS = 0, /** keyboard input. argument is an 8-byte typical USB keyboard report, see [[formatKeyboardCommand]] */ KEYBOARD = 1, /** mouse input. argument is an 8-byte custom USB absolute mouse report, see [[formatMouseCommand]] */ MOUSE = 2, /** restart the video stream. no arguments */ REQUEST_RESYNC = 5, /** no arguments */ ACK = 12 } export declare const powerStatusCommands: { MOMENTARY_PRESS: Buffer; PRESS_AND_HOLD: Buffer; POWER_CYCLE: Buffer; SYSTEM_RESET: Buffer; }; /** Note: Excluding DV keycodes, only the first 6 keycodes in the array will be sent. */ export declare function formatKeyboardCommand(hidKeycodes: number[]): Buffer; /** * Screen coordinates should be divided by screen width / height first, * so they end up in range [0, 1]. * * `buttons` is a bitfield of the pressed buttons: bit 0 is the 'left' * button, bit 1 is the 'right' button, and bit 2 is the middle button. */ export declare function formatMouseCommand(x: number, y: number, buttons: number): Buffer;