2
0
mirror of https://github.com/pikvm/pikvm synced 2024-11-16 12:12:57 +00:00
pikvm/docs/mouse.md

91 lines
3.4 KiB
Markdown
Raw Normal View History

2021-10-12 18:45:00 +00:00
# Mouse
2020-11-03 20:23:23 +00:00
2020-11-03 21:38:04 +00:00
There are two modes of pointer device: absolute and relative.
2020-11-03 20:23:23 +00:00
2021-10-12 18:45:00 +00:00
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.
2020-11-03 20:23:23 +00:00
2021-10-12 18:45:00 +00:00
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.
2020-11-03 20:23:23 +00:00
2021-09-26 08:47:33 +00:00
By default, PiKVM uses absolute positioning mode as the most convenient for the user and software.
2020-11-03 20:23:23 +00:00
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.
2021-09-26 08:47:33 +00:00
When using relative mode, the browser will exclusively capture your mouse when you click on the stream window in PiKVM once.
2020-11-03 20:23:23 +00:00
When you press `Esc`, the browser releases the mouse.
2021-10-12 18:45:00 +00:00
## Important notes
2020-11-11 09:21:18 +00:00
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.
2020-11-03 20:23:23 +00:00
2021-09-26 08:47:33 +00:00
Also currently the relative mouse mode is not supported by [PiKVM VNC server](vnc.md) yet. The reason is that none of the recommended clients support the [QEMU Pointer Motion Change](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#qemu-pointer-motion-change-pseudo-encoding) extension.
2020-11-11 09:21:18 +00:00
We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/issues/619). The relative mode is also not supported by mobile browsers.
2020-11-03 21:38:04 +00:00
2021-10-12 18:45:00 +00:00
## Relative mouse on v2+ platform (OTG HID)
2021-08-02 21:34:53 +00:00
### Dual mode
2021-10-12 18:45:00 +00:00
2021-08-02 21:34:53 +00:00
Using dual mouse mode you can switch between the absolute and relative mouse in the `System` menu without reloading.
This is more convenient, but for compatibility reasons it is disabled by default. To enable it, do the following:
2021-10-12 18:45:00 +00:00
1. Switch filesystem to RW-mode using command `rw`.
2. Edit `/etc/kvmd/override.yaml` and add these lines:
```yaml
kvmd:
hid:
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
```
3. Perform `reboot`. After that reboot your PC.
2021-08-02 21:34:53 +00:00
2021-08-14 01:18:44 +00:00
### Single relative mode
2021-10-12 18:45:00 +00:00
1. Switch filesystem to RW-mode using command `rw`.
2. Edit `/etc/kvmd/override.yaml` and add these lines:
```yaml
kvmd:
hid:
mouse:
absolute: false
```
3. Perform `reboot`. After that reboot your PC.
4. If the mouse is still not detected by the BIOS/UEFI, try disabling horizontal scrolling to achieve the maximum compatibility:
```yaml
kvmd:
hid:
mouse:
absolute: false
horizontal_wheel: false
```
5. Don't forget to perform `reboot`.
## Relative mouse on v0 platform (Arduino HID)
Mode switching for [Arduino HID](arduino_hid.md) can be performed on-the-fly starting with KVMD 2.6 and the corresponding firmware. No additional actions are required.
## Fixing the absolute mouse on Windows 98
2021-08-14 06:36:47 +00:00
Due to an ancient buggy driver, the absolute mouse on Windows 98 moves only within the upper-left quarter of the screen. To fix this, you need to activate some magic workaround in `/etc/kvmd/override.yaml`:
2021-10-12 18:45:00 +00:00
2021-08-14 06:36:47 +00:00
```yaml
kvmd:
hid:
mouse:
absolute_win98_fix: true
```
2021-10-12 18:45:00 +00:00
... and run `systemctl restart kvmd`.