Skip to content

Function: encodeMouse()

@termwright/driver/experimental


@termwright/driver/experimental / encodeMouse

encodeMouse(event, modes): Uint8Array

Defined in: mouse.ts:100

Encodes one mouse event.

MouseEvent

the event in zero-based viewport coordinates

TerminalModes

current tracking/encoding modes as observed on the wire

Uint8Array

InputModeDisabledError when the child has no mouse tracking enabled, or when the coordinates cannot be expressed in the negotiated encoding.