diff options
author | Maxim Devaev <[email protected]> | 2020-11-03 04:50:08 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-03 04:50:08 +0300 |
commit | 544f4b3fecb84e2ae21eb71ec0c37c8bec38261c (patch) | |
tree | 9199dba963bf8dde4cf4137f61b0cb5119fb7159 /kvmd/apps/otg/__init__.py | |
parent | 6ec82dde5d4eb4b52956fff2029f33c4e651b919 (diff) |
Relative (#18)
* refactoring
* basic relative mouse mode
Diffstat (limited to 'kvmd/apps/otg/__init__.py')
-rw-r--r-- | kvmd/apps/otg/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py index 50c5b836..edaf541f 100644 --- a/kvmd/apps/otg/__init__.py +++ b/kvmd/apps/otg/__init__.py @@ -43,7 +43,8 @@ from .. import init from .hid import Hid from .hid.keyboard import KEYBOARD_HID -from .hid.mouse import MOUSE_HID +from .hid.mouse import MOUSE_ABSOLUTE_HID +from .hid.mouse import MOUSE_RELATIVE_HID # ===== @@ -203,7 +204,10 @@ def _cmd_start(config: Section) -> None: if config.kvmd.hid.type == "otg": logger.info("===== Required HID =====") _create_hid(gadget_path, config_path, 0, KEYBOARD_HID) - _create_hid(gadget_path, config_path, 1, MOUSE_HID) + if config.kvmd.hid.mouse.absolute: + _create_hid(gadget_path, config_path, 1, MOUSE_ABSOLUTE_HID) + else: + _create_hid(gadget_path, config_path, 1, MOUSE_RELATIVE_HID) if config.kvmd.msd.type == "otg": logger.info("===== Required MSD =====") |