summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg/mouse.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/hid/otg/mouse.py')
-rw-r--r--kvmd/plugins/hid/otg/mouse.py7
1 files changed, 7 insertions, 0 deletions
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: