summaryrefslogtreecommitdiff
path: root/kvmd/apps/vnc/server.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-11-03 18:28:28 +0200
committerMaxim Devaev <[email protected]>2024-11-03 18:28:28 +0200
commitd93639ba8dcd003f82221f4ed99159755f2213c3 (patch)
treecc3291955215ec1455f26922f50de27563d47a5f /kvmd/apps/vnc/server.py
parent1e277c0f06f25e67a35a1b2910ed59333f97f6c0 (diff)
hid with granularity prototype
Diffstat (limited to 'kvmd/apps/vnc/server.py')
-rw-r--r--kvmd/apps/vnc/server.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py
index c14bb21f..e8524a38 100644
--- a/kvmd/apps/vnc/server.py
+++ b/kvmd/apps/vnc/server.py
@@ -189,7 +189,11 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
self.__shared_params.name = name
elif event_type == "hid_state":
- if self._encodings.has_leds_state:
+ if (
+ self._encodings.has_leds_state
+ and ("keyboard" in event)
+ and ("leds" in event["keyboard"])
+ ):
await self._send_leds_state(**event["keyboard"]["leds"])
# =====