2
0
mirror of https://github.com/pikvm/pikvm synced 2024-11-18 09:25:43 +00:00
pikvm/pages/mouse.md
2021-07-10 11:23:49 +03:00

2.6 KiB

Mouse modes

There are two modes of pointer device: absolute and relative.

In absolute mode, the input device transmits the exact coordinates (X,Y) where the cursor should be moved. This is how touchscreens or drawing tablets work.

In relative mode, only the relative offset (dX,dY) to the current position is transmitted, which is unknown to the input device itself. This is a regular mouse.

By default, Pi-KVM uses absolute positioning mode as the most convenient for the user and software. However, this is not always supported by the BIOS/UEFI. For such cases, support is provided for the relative mode of operation, which can be enabled in the config.

When using relative mode, the browser will exclusively capture your mouse when you click on the stream window in Pi-KVM once. When you press Esc, the browser releases the mouse.

Important notes

The relative mouse generates a huge number of events that can be poorly transmitted over the network or very slowly perceived by the BIOS/UEFI driver. To solve this problem, mouse events are optimized using a vector sum. This mode is enabled by default and is available in the web menu System -> Squash mouse moves. You can try disabling this if you have problems with mouse acceleration. This is the best and most reasonable compromise right now.

Also currently the relative mouse mode is not supported by Pi-KVM VNC server yet. The reason is that none of the recommended clients support the QEMU Pointer Motion Change extension. We expect to implement this in TigerVNC. The relative mode is also not supported by mobile browsers.

Enabling the relative mouse on the v2 platform (OTG HID)

  • Switch filesystem to RW-mode using command rw.
  • Edit /etc/kvmd/override.yaml and add these lines:
    kvmd:
        hid:
            mouse:
                absolute: false
    
  • Perform reboot. After that reboot your PC.
  • If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to achieve the maximum compatibility:
    kvmd:
        hid:
            mouse:
                absolute: false
                horizontal_wheel: false
    
  • Don't forget to perform reboot.

Enabling the relative mouse on the v0 platform (Arduino HID)

Mode switching for Arduino HID can be performed on-the-fly starting with KVMD 2.6 and the corresponding firmware. No additional actions are required.