summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg/__init__.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-10-03 09:58:15 +0300
committerDevaev Maxim <[email protected]>2020-10-03 09:58:15 +0300
commit877a0b844100c51ff96f19f4a00abed02dadec89 (patch)
tree0c4b068707931926ecdaab6a9563be9330616b34 /kvmd/plugins/hid/otg/__init__.py
parent971eb1c203e5dfacd55b7c1e215071b3ebd0c153 (diff)
processing udc state
Diffstat (limited to 'kvmd/plugins/hid/otg/__init__.py')
-rw-r--r--kvmd/plugins/hid/otg/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py
index adbabfb9..95dd34cd 100644
--- a/kvmd/plugins/hid/otg/__init__.py
+++ b/kvmd/plugins/hid/otg/__init__.py
@@ -37,6 +37,7 @@ from ....validators.os import valid_abs_path
from .. import BaseHid
+from .usb import UsbDeviceController
from .keyboard import KeyboardProcess
from .mouse import MouseProcess
@@ -48,12 +49,15 @@ class Plugin(BaseHid):
keyboard: Dict[str, Any],
mouse: Dict[str, Any],
noop: bool,
+ udc: str, # XXX: Not from options, see /kvmd/apps/kvmd/__init__.py for details
) -> None:
self.__notifier = aiomulti.AioProcessNotifier()
- self.__keyboard_proc = KeyboardProcess(noop=noop, notifier=self.__notifier, **keyboard)
- self.__mouse_proc = MouseProcess(noop=noop, notifier=self.__notifier, **mouse)
+ self.__udc = UsbDeviceController(udc)
+
+ self.__keyboard_proc = KeyboardProcess(udc=self.__udc, noop=noop, notifier=self.__notifier, **keyboard)
+ self.__mouse_proc = MouseProcess(udc=self.__udc, noop=noop, notifier=self.__notifier, **mouse)
@classmethod
def get_plugin_options(cls) -> Dict:
@@ -74,6 +78,7 @@ class Plugin(BaseHid):
}
def sysprep(self) -> None:
+ self.__udc.find()
self.__keyboard_proc.start()
self.__mouse_proc.start()