jacdac.hid_mouse

Submodules

Package Contents

Classes

HidMouseClient

Controls a HID mouse.

class jacdac.hid_mouse.HidMouseClient(bus: jacdac.bus.Bus, role: str)

Bases: jacdac.bus.Client

Controls a HID mouse. Implements a client for the HID Mouse service.

set_button(buttons: jacdac.hid_mouse.constants.HidMouseButton, ev: jacdac.hid_mouse.constants.HidMouseButtonEvent) None

Sets the up/down state of one or more buttons. A Click is the same as Down followed by Up after 100ms. A DoubleClick is two clicks with 150ms gap between them (that is, 100ms first click, 150ms gap, 100ms second click).

move(dx: int, dy: int, time: int) None

Moves the mouse by the distance specified. If the time is positive, it specifies how long to make the move.

wheel(dy: int, time: int) None

Turns the wheel up or down. Positive if scrolling up. If the time is positive, it specifies how long to make the move.