summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-11-19 23:28:23 +0300
committerDevaev Maxim <[email protected]>2020-11-20 00:15:18 +0300
commita77db72355c760eb38deb4c46a83fb7d3f2ed008 (patch)
tree208cd060c234fbfd77ef3c1879ed906950660bed /kvmd/plugins/hid/otg
parent188de715153100806bc4a95f3888f6f03f1ede2f (diff)
multihid firmware
Diffstat (limited to 'kvmd/plugins/hid/otg')
-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]: