You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
4.0 KiB
Markdown

3 years ago
# Mouse
4 years ago
4 years ago
There are two modes of pointer device: absolute and relative.
4 years ago
3 years ago
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.
4 years ago
3 years ago
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.
4 years ago
3 years ago
By default, PiKVM uses absolute positioning mode as the most convenient for the user and software.
4 years ago
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.
3 years ago
When using relative mode, the browser will exclusively capture your mouse when you click on the stream window in PiKVM once.
4 years ago
When you press `Esc`, the browser releases the mouse.
3 years ago
10 months ago
-----
3 years ago
## 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 activating the below first 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.
4 years ago
3 years ago
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.
4 years ago
We expect to implement this in [TigerVNC](https://github.com/TigerVNC/tigervnc/issues/619). The relative mode is also not supported by mobile browsers.
4 years ago
3 years ago
10 months ago
-----
1 year ago
## Relative mouse on V2+ platform (OTG HID)
!!! info
On PiKVM V4 dual mode is enabled by default. To disable it and enable single mode, set `kvmd/hid/mouse_alt/device` (see below) to empty string:
```yaml
kvmd:
hid:
mouse_alt:
device: ""
```
3 years ago
10 months ago
3 years ago
### Dual mode
3 years ago
3 years ago
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:
3 years ago
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.
3 years ago
3 years ago
### Single relative mode
3 years ago
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`.
10 months ago
### Fixing the absolute mouse on Windows 98
3 years ago
12 months ago
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. Due to the specifics of the implementation, you will have to turn on the relative mouse too. Write it in `/etc/kvmd/override.yaml`:
3 years ago
3 years ago
```yaml
kvmd:
hid:
mouse:
absolute_win98_fix: true
12 months ago
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
3 years ago
```
3 years ago
12 months ago
... and run `systemctl restart kvmd`. After that, you will get 3 new buttons with mouse modes in the **System** menu in Web UI. Switch it to **Abs-Win98**.
10 months ago
-----
9 months ago
## Relative mouse on V0-V1 platform (Pico/Arduino HID)
10 months ago
6 months ago
Mode switching for the [Pico HID](pico_hid.md) or [legacy 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.