summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg/__init__.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-11-22 14:33:18 +0300
committerDevaev Maxim <[email protected]>2020-11-22 14:33:18 +0300
commitb7e0ee3300ddca0b4c7049ee9bfb172996b56ff2 (patch)
treed5ac6caf34cf0eeef3e464b7f1102cc8e3ddf469 /kvmd/plugins/hid/otg/__init__.py
parentd8a631ab84de53ad387c452f55b6060bcc2300c0 (diff)
parent48550d2e78acb7e2669f8bd9595330c4001302f1 (diff)
Merge branch 'multihid'
Diffstat (limited to 'kvmd/plugins/hid/otg/__init__.py')
-rw-r--r--kvmd/plugins/hid/otg/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py
index aa3d79b2..e685226b 100644
--- a/kvmd/plugins/hid/otg/__init__.py
+++ b/kvmd/plugins/hid/otg/__init__.py
@@ -89,8 +89,9 @@ 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": ""}
return {
- "online": (keyboard_state["online"] and mouse_state["online"]),
+ "online": True,
"keyboard": {
"online": keyboard_state["online"],
"leds": {
@@ -98,8 +99,9 @@ class Plugin(BaseHid):
"scroll": keyboard_state["scroll"],
"num": keyboard_state["num"],
},
+ "outputs": outputs,
},
- "mouse": mouse_state,
+ "mouse": {**mouse_state, "outputs": outputs},
}
async def poll_state(self) -> AsyncGenerator[Dict, None]: