diff options
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/hid/_mcu/__init__.py | 13 | ||||
-rw-r--r-- | kvmd/plugins/hid/bt/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/hid/otg/__init__.py | 2 |
3 files changed, 8 insertions, 9 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"]: diff --git a/kvmd/plugins/hid/bt/__init__.py b/kvmd/plugins/hid/bt/__init__.py index c13e2a34..55c4c979 100644 --- a/kvmd/plugins/hid/bt/__init__.py +++ b/kvmd/plugins/hid/bt/__init__.py @@ -131,7 +131,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes async def get_state(self) -> Dict: state = await self.__server.get_state() - outputs: Dict = {"available": {}, "active": ""} + outputs: Dict = {"available": [], "active": ""} return { "online": True, "keyboard": { diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py index e685226b..49fec56c 100644 --- a/kvmd/plugins/hid/otg/__init__.py +++ b/kvmd/plugins/hid/otg/__init__.py @@ -89,7 +89,7 @@ class Plugin(BaseHid): async def get_state(self) -> Dict: keyboard_state = await self.__keyboard_proc.get_state() mouse_state = await self.__mouse_proc.get_state() - outputs: Dict = {"available": {}, "active": ""} + outputs: Dict = {"available": [], "active": ""} return { "online": True, "keyboard": { |