diff options
author | Maxim Devaev <[email protected]> | 2021-08-14 09:21:04 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-08-14 09:29:12 +0300 |
commit | ed5952f13ef1baede4101934bc5df952ce66af1b (patch) | |
tree | 62d89ad0203fafdb018dc31ba97a3ae96c8aafca /kvmd/plugins/hid/otg/__init__.py | |
parent | c4b9eba250b15afb09720d4a9e2818a9bf447efe (diff) |
fixed pikvm/pikvm#159: workaround for windows 98 absolute mouse bug
Diffstat (limited to 'kvmd/plugins/hid/otg/__init__.py')
-rw-r--r-- | kvmd/plugins/hid/otg/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
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), |