summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bumpversion.cfg2
-rw-r--r--PKGBUILD2
-rw-r--r--hid/platformio.ini4
-rw-r--r--hid/src/usb/hid.h3
-rw-r--r--kvmd/__init__.py2
-rw-r--r--kvmd/plugins/hid/otg/__init__.py9
-rw-r--r--kvmd/plugins/hid/otg/mouse.py7
-rwxr-xr-xsetup.py2
-rw-r--r--web/kvm/index.html1
-rw-r--r--web/kvm/window-about.pug1
10 files changed, 27 insertions, 6 deletions
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 2095358a..49fbd42f 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,7 +1,7 @@
[bumpversion]
commit = True
tag = True
-current_version = 3.14
+current_version = 3.17
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
serialize =
{major}.{minor}
diff --git a/PKGBUILD b/PKGBUILD
index ccb5c39a..8b66134d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,7 +31,7 @@ for _variant in "${_variants[@]}"; do
pkgname+=(kvmd-platform-$_platform-$_board)
done
pkgbase=kvmd
-pkgver=3.14
+pkgver=3.17
pkgrel=1
pkgdesc="The main Pi-KVM daemon"
url="https://github.com/pikvm/kvmd"
diff --git a/hid/platformio.ini b/hid/platformio.ini
index a8a0988d..fa42db0b 100644
--- a/hid/platformio.ini
+++ b/hid/platformio.ini
@@ -7,7 +7,7 @@ platform = atmelavr
board = micro
framework = arduino
lib_deps =
- git+https://github.com/NicoHood/HID#50c1c5745aee201b8f3388c31db7cc66292b2ea5
+ git+https://github.com/mdevaev/HID#f12b7d633f7437552707d6ccd411204cf36601f2
git+https://github.com/Harvie/ps2dev#v0.0.3
extra_scripts =
@@ -24,6 +24,8 @@ build_flags =
-DHID_WITH_USB
-DHID_SET_USB_KBD
-DHID_SET_USB_MOUSE_ABS
+# ----- The USB ABS fix for Windows 98 (https://github.com/pikvm/pikvm/issues/159) -----
+# -DHID_USB_ABS_WIN98_FIX
# ----- PS2 keyboard only -----
# -DHID_WITH_PS2
# -DHID_SET_PS2_KBD
diff --git a/hid/src/usb/hid.h b/hid/src/usb/hid.h
index f40cbf36..6c3772f2 100644
--- a/hid/src/usb/hid.h
+++ b/hid/src/usb/hid.h
@@ -151,6 +151,9 @@ class UsbMouseAbsolute {
void begin() {
_mouse.begin();
+#ifdef HID_USB_ABS_WIN98_FIX
+ _mouse.setWin98Fix(true);
+#endif
}
void clear() {
diff --git a/kvmd/__init__.py b/kvmd/__init__.py
index 826c9127..fbb15aec 100644
--- a/kvmd/__init__.py
+++ b/kvmd/__init__.py
@@ -20,4 +20,4 @@
# ========================================================================== #
-__version__ = "3.14"
+__version__ = "3.17"
diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py
index 0ba74c88..030c551d 100644
--- a/kvmd/plugins/hid/otg/__init__.py
+++ b/kvmd/plugins/hid/otg/__init__.py
@@ -72,7 +72,12 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
self.__output_to_mouse: Dict[str, MouseProcess] = {}
self.__mouse_to_output: Dict[MouseProcess, str] = {}
if mouse_alt["device_path"]:
- self.__mouse_alt_proc = MouseProcess(absolute=(not mouse["absolute"]), **common, **mouse_alt)
+ self.__mouse_alt_proc = MouseProcess(
+ absolute=(not mouse["absolute"]),
+ absolute_win98_fix=mouse["absolute_win98_fix"],
+ **common,
+ **mouse_alt,
+ )
self.__output_to_mouse = {
"usb": (self.__mouse_proc if mouse["absolute"] else self.__mouse_alt_proc),
"usb_rel": (self.__mouse_alt_proc if mouse["absolute"] else self.__mouse_proc),
@@ -94,6 +99,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
"queue_timeout": Option(0.1, type=valid_float_f01),
"write_retries": Option(150, type=valid_int_f1),
"absolute": Option(True, type=valid_bool),
+ "absolute_win98_fix": Option(False, type=valid_bool),
"horizontal_wheel": Option(True, type=valid_bool),
},
"mouse_alt": {
@@ -102,6 +108,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
"queue_timeout": Option(0.1, type=valid_float_f01),
"write_retries": Option(150, type=valid_int_f1),
# No absolute option here, initialized by (not mouse.absolute)
+ # Also no absolute_win98_fix
"horizontal_wheel": Option(True, type=valid_bool),
},
"noop": Option(False, type=valid_bool),
diff --git a/kvmd/plugins/hid/otg/mouse.py b/kvmd/plugins/hid/otg/mouse.py
index 620effc5..4ede3277 100644
--- a/kvmd/plugins/hid/otg/mouse.py
+++ b/kvmd/plugins/hid/otg/mouse.py
@@ -42,6 +42,7 @@ from .events import make_mouse_report
class MouseProcess(BaseDeviceProcess):
def __init__(self, **kwargs: Any) -> None:
self.__absolute: bool = kwargs.pop("absolute")
+ self.__absolute_win98_fix: bool = kwargs.pop("absolute_win98_fix")
self.__horizontal_wheel: bool = kwargs.pop("horizontal_wheel")
super().__init__(
@@ -143,6 +144,12 @@ class MouseProcess(BaseDeviceProcess):
assert relative_event is None
move_x = self.__x
move_y = self.__y
+ if self.__absolute_win98_fix:
+ # https://github.com/pikvm/pikvm/issues/159
+ # For some reason, the correct implementation of this fix
+ # is a shift to the left, and not to the right, as in VirtualBox
+ move_x <<= 1
+ move_y <<= 1
else:
assert self.__x == self.__y == 0
if relative_event is not None:
diff --git a/setup.py b/setup.py
index 61315de9..2a16e2a6 100755
--- a/setup.py
+++ b/setup.py
@@ -67,7 +67,7 @@ def main() -> None:
setup(
name="kvmd",
- version="3.14",
+ version="3.17",
url="https://github.com/pikvm/kvmd",
license="GPLv3",
author="Maxim Devaev",
diff --git a/web/kvm/index.html b/web/kvm/index.html
index 13d35041..540b5131 100644
--- a/web/kvm/index.html
+++ b/web/kvm/index.html
@@ -1800,6 +1800,7 @@
<li>Nis Wechselberg</li>
<li>Nithin Philips</li>
<li>Nod Swal</li>
+ <li>Nolan Haynes</li>
<li>nubbn</li>
<li>nybble</li>
<li>Oh Be</li>
diff --git a/web/kvm/window-about.pug b/web/kvm/window-about.pug
index 0c98dbcd..2d7cada0 100644
--- a/web/kvm/window-about.pug
+++ b/web/kvm/window-about.pug
@@ -357,6 +357,7 @@ div(id="about-window" class="window")
li Nis Wechselberg
li Nithin Philips
li Nod Swal
+ li Nolan Haynes
li nubbn
li nybble
li Oh Be