Module autopilot::mouse [] [src]

This module contains functions for getting the current state of and controlling the mouse cursor.

Unless otherwise stated, coordinates are those of a screen coordinate system, where the origin is at the top left.

Enums

Button
MouseError

Functions

click

A convenience wrapper around toggle() that holds down and then releases the given mouse button.

location

Returns the current position of the mouse cursor.

move_to

Immediately moves the mouse to the given coordinate.

smooth_move

Gradually moves the mouse to a coordinate in a straight line in the given time frame (in seconds). If no duration is given a 1 millisecond delay is defaulted to between mouse movements.

toggle

Holds down or releases a mouse button in the current position.