summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg/__init__.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-10-26 08:28:18 +0300
committerMaxim Devaev <[email protected]>2023-10-26 08:28:18 +0300
commit7bb553110068fa0ae5a5ed230d58322ded385ade (patch)
tree810c056d9b03aea5b0c3929546b7b4486558297e /kvmd/plugins/hid/otg/__init__.py
parentaec67270205ac9d149c0c71a1891f4942eba477b (diff)
option to disable jiggler
Diffstat (limited to 'kvmd/plugins/hid/otg/__init__.py')
-rw-r--r--kvmd/plugins/hid/otg/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py
index 30357c9a..61b8a194 100644
--- a/kvmd/plugins/hid/otg/__init__.py
+++ b/kvmd/plugins/hid/otg/__init__.py
@@ -49,11 +49,12 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
keyboard: dict[str, Any],
mouse: dict[str, Any],
mouse_alt: dict[str, Any],
+ jiggler: dict[str, Any],
noop: bool,
udc: str, # XXX: Not from options, see /kvmd/apps/kvmd/__init__.py for details
) -> None:
- super().__init__()
+ super().__init__(**jiggler)
self.__udc = udc
@@ -112,6 +113,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
"horizontal_wheel": Option(True, type=valid_bool),
},
"noop": Option(False, type=valid_bool),
+ **cls._get_jiggler_options(),
}
def sysprep(self) -> None:
@@ -145,7 +147,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
},
**mouse_state,
},
- "jiggler": self._get_jiggler_state(),
+ **self._get_jiggler_state(),
}
async def poll_state(self) -> AsyncGenerator[dict, None]:
@@ -210,7 +212,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
self._set_jiggler_absolute(self.__mouse_current.is_absolute())
self.__notifier.notify()
if jiggler is not None:
- self._set_jiggler_enabled(jiggler)
+ self._set_jiggler_active(jiggler)
self.__notifier.notify()
def clear_events(self) -> None: