hid with granularity prototype

This commit is contained in:
Maxim Devaev
2024-11-03 18:28:28 +02:00
parent 1e277c0f06
commit d93639ba8d
9 changed files with 164 additions and 90 deletions

View File

@@ -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"])
# =====