diff options
author | Devaev Maxim <[email protected]> | 2020-12-01 10:36:48 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-12-01 10:36:48 +0300 |
commit | 5eff81061bce75d15a3e8634ec38be2481c8b4ef (patch) | |
tree | f132aec2f2086c5c5230c90279474a27c094c436 /kvmd/plugins/hid/_mcu | |
parent | f4a8a117c73dc21db0960c3353184d3698484ed0 (diff) |
simplified outputs api
Diffstat (limited to 'kvmd/plugins/hid/_mcu')
-rw-r--r-- | kvmd/plugins/hid/_mcu/__init__.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kvmd/plugins/hid/_mcu/__init__.py b/kvmd/plugins/hid/_mcu/__init__.py index 52d9912d..38707572 100644 --- a/kvmd/plugins/hid/_mcu/__init__.py +++ b/kvmd/plugins/hid/_mcu/__init__.py @@ -174,18 +174,17 @@ class BaseMcuHid(BaseHid, multiprocessing.Process): # pylint: disable=too-many- if online and active_mouse in ["usb_rel", "ps2"]: absolute = False - keyboard_outputs: Dict = {"available": {}, "active": ""} - mouse_outputs: Dict = {"available": {}, "active": ""} + keyboard_outputs: Dict = {"available": [], "active": ""} + mouse_outputs: Dict = {"available": [], "active": ""} if outputs & 0b10000000: # Dynamic if features & 0b00000001: # USB - keyboard_outputs["available"]["usb"] = {"name": "USB"} - mouse_outputs["available"]["usb"] = {"name": "USB", "absolute": True} - mouse_outputs["available"]["usb_rel"] = {"name": "USB Relative", "absolute": False} + keyboard_outputs["available"].extend(["usb"]) + mouse_outputs["available"].extend(["usb", "usb_rel"]) if features & 0b00000010: # PS/2 - keyboard_outputs["available"]["ps2"] = {"name": "PS/2"} - mouse_outputs["available"]["ps2"] = {"name": "PS/2"} + keyboard_outputs["available"].extend(["ps2"]) + mouse_outputs["available"].extend(["ps2"]) active_keyboard = get_active_keyboard(outputs) if active_keyboard in keyboard_outputs["available"]: |