wuni-mouse: Logitech Unifying mouse tool ======================================== ``wuni-mouse`` synchronizes with a connected Logitech Unifying mouse dongle and sends spoofed moves and clicks. Usage ----- .. code-block:: text wuni-mouse -i [-a/--address ADDRESS] [-d/--duplicate] A compatible WHAD *interface* is required to listen to packets transmitted by a Logitech Unifying device and send spoofed packets. Device address (*ADDRESS*) is mandatory as it specifies the wireless mouse device to target. Command-line options -------------------- **wuni-mouse** supports the following options: * ``--interface`` (``-i``): specifies the WHAD interface to use to connect to the target device * ``--no-color``: disables colors in output * ``--address`` (``-a``): specify the target wireless mouse address * ``--duplicate`` (``-d``): enable mouse duplication feature .. include:: ../generic/debug-options.rst Logging mouse moves and button presses -------------------------------------- If ``wuni-mouse`` is simply executed against a wireless Logitech Unifying mouse, it synchronizes with this mouse and logs every move and button press sent by the device to its associated dongle. .. code-block:: text $ wuni-mouse -i uart0 -a 49:f9:51:2e:a4 Mouse move (dx:-3, dy:-1) Mouse move (dx:-4, dy:0) Mouse move (dx:-6, dy:-1) Mouse move (dx:-6, dy:0) Mouse move (dx:-7, dy:0) Mouse move (dx:-6, dy:1) Mouse move (dx:-6, dy:1) Mouse move (dx:-5, dy:2) Mouse move (dx:-2, dy:1) Mouse move (dx:-2, dy:2) Mouse move (dx:-2, dy:2) Mouse move (dx:-1, dy:1) Mouse move (dx:-2, dy:2) Mouse move (dx:0, dy:0) | left button pressed Mouse move (dx:0, dy:0) | left button released Mouse move (dx:0, dy:0) | left button pressed Mouse move (dx:0, dy:0) | left button released Mouse move (dx:0, dy:0) | right button pressed Mouse move (dx:0, dy:1) Mouse move (dx:0, dy:0) | right button released Mouse move (dx:0, dy:-1) Mouse move (dx:0, dy:0) | right button pressed Mouse move (dx:0, dy:1) Mouse move (dx:0, dy:0) | right button released Mouse move (dx:0, dy:-1) Interact with a remote wireless mouse (mouse duplication) --------------------------------------------------------- ``wuni-mouse`` is also able to capture the system mouse movements and button presses and send them to the targeted wireless mouse, allowing to control it in an interactive manner. This feature can be stopped by hitting *CTL-C*. .. code-block:: text $ wuni-mouse -i uart0 -a 49:f9:51:2e:a4 -d Mouse found and locked, duplicating mouse moves and clicks (hit CTL-C to stop) Sending mouse moves and clicks using piped input ------------------------------------------------ ``wuni-mouse`` can be used with other tools and programs to send specific mouse moves and clicks to a target wireless mouse. When ``wuni-mouse`` standard input is piped with another program, it will read any incoming line and interpret it as a mouse command. This command has to respect the following format: `DELTA_X,DELTA_Y,WHEEL_X,WHEEL_Y,BUTTONS`, with `DELTA_X` and `DELTA_Y` decimal integers indicating a relative mouse move, `WHEEL_X` and `WHEEL_Y` decimal integers indicating a relative wheel mouse on X and Y axes while `BUTTONS` can be used to specify a click using respectively `R` for a right-button click, `L` for a left-button click and `M` for a middle-button click. For example, the following command will move the mouse cursor by 100 units on X and Y and then send a right-button click. .. code-block:: text $ echo "100,100,0,0,R" | wuni-mouse -i uart0 -a 49:f9:51:2e:a4 .. warning:: This tool cannot be used in conjunction with ``wserver``, due to extra latency induced by the TCP connection