Hid

Documentation for library Hid.

  • Type: LIBRARY

  • Scope: TEST

Keywords

Click Pointer Button

Press and release the specified pointer button.

Args: button: either LEFT, MIDDLE or RIGHT.

Positional and named arguments

Name

Type

Default Value

Kind

Required

button

string

POSITIONAL_OR_NAMED

Yes


Keys Combo

Press and release a combination of keys.

Arguments: combo: first key, or a list of keys to press at the same time. *keys: remaining keys to press.

Raises: AssertionError: If both combo and keys are provided.

Positional and named arguments

Name

Type

Default Value

Kind

Required

combo

None

POSITIONAL_OR_NAMED

Yes

keys

string

VAR_POSITIONAL

No


Move Pointer To Absolute

Move the virtual pointer to an absolute position within the output.

Args: x: horizontal coordinate, 0 <= x <= screen width y: vertical coordinate, 0 <= y <= screen height

Raises: AssertionError: if coordinates are out of range

Positional and named arguments

Name

Type

Default Value

Kind

Required

x

integer

POSITIONAL_OR_NAMED

Yes

y

integer

POSITIONAL_OR_NAMED

Yes


Move Pointer To Proportional

Move the virtual pointer to a position proportional to the size of the output.

Args: x: horizontal coordinate, 0 <= x <= 1 y: vertical coordinate, 0 <= y <= 1

Raises: AssertionError: if coordinates are out of range

Positional and named arguments

Name

Type

Default Value

Kind

Required

x

float

POSITIONAL_OR_NAMED

Yes

y

float

POSITIONAL_OR_NAMED

Yes


Press Pointer Button

Press the specified pointer button.

Args: button: either LEFT, MIDDLE or RIGHT.

Positional and named arguments

Name

Type

Default Value

Kind

Required

button

string

POSITIONAL_OR_NAMED

Yes


Release Pointer Button

Release the specified pointer button.

Args: button: either LEFT, MIDDLE or RIGHT.

Positional and named arguments

Name

Type

Default Value

Kind

Required

button

string

POSITIONAL_OR_NAMED

Yes


Release Pointer Buttons

Release all pointer buttons.


Type String

Type a string.

Args: string: string to type.

Positional and named arguments

Name

Type

Default Value

Kind

Required

string

string

POSITIONAL_OR_NAMED

Yes


Walk Pointer To Absolute

Walk the virtual pointer to an absolute position within the output, maximum step_distance at a time, with delay seconds in between.

Args: x: horizontal coordinate, 0 <= x <= screen width y: vertical coordinate, 0 <= y <= screen height step_distance: maximum distance to move per step delay: delay between steps in seconds

Raises: AssertionError: if coordinates are out of range or if x and y are not integers

Positional and named arguments

Name

Type

Default Value

Kind

Required

x

integer

POSITIONAL_OR_NAMED

Yes

y

integer

POSITIONAL_OR_NAMED

Yes

step_distance

float

POSITIONAL_OR_NAMED

Yes

delay

float

POSITIONAL_OR_NAMED

Yes


Walk Pointer To Proportional

Walk the virtual pointer to a position proportional to the size of the output, maximum step_distance at a time, with delay seconds in between.

Args: x: horizontal coordinate, 0 <= x <= 1 y: vertical coordinate, 0 <= y <= 1 step_distance: maximum distance to move per step delay: delay between steps in seconds

Raises: AssertionError: if coordinates are out of range

Positional and named arguments

Name

Type

Default Value

Kind

Required

x

float

POSITIONAL_OR_NAMED

Yes

y

float

POSITIONAL_OR_NAMED

Yes

step_distance

float

POSITIONAL_OR_NAMED

Yes

delay

float

POSITIONAL_OR_NAMED

Yes