HIDMouse
HID Mouse Module for USB Gadget functionality
Constants
Log = ::Log.for(self)
MOUSE_BUTTONS = {"left" => 1_u8, "right" => 2_u8, "middle" => 4_u8}
Mouse button mappings
Class methods
create_mouse_absolute_report(buttons : Array(String) = [] of String, x : Int32 = 0, y : Int32 = 0) : Bytes
Create an absolute mouse report (buttons + 16-bit absolute X/Y)
create_mouse_report(buttons : Array(String) = [] of String, x_delta : Int32 = 0, y_delta : Int32 = 0, wheel : Int32 = 0) : Bytes
Sourcesend_mouse_absolute_move(device_path : String, x : Int32, y : Int32, buttons : Array(String) = [] of String)
Source