summaryrefslogtreecommitdiff
path: root/kvmd/apps/vnc/server.py
diff options
context:
space:
mode:
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"])
# =====