Hid¶
A Robot Framework library for interacting with virtual Wayland-based HIDs.
The client connects to the display upon entering the first keyword, and disconnects when the library goes out of scope.
If WAYLAND_DISPLAY is not defined, it defaults to 'wayland-0'.
Attributes: ROBOT_LISTENER_API_VERSION: Robot listener API version
Type: LIBRARY
Scope: TEST
Keywords¶
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 |
Type String¶
Type a string.
Arguments: 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 |