diff options
author | Devaev Maxim <[email protected]> | 2020-02-28 04:44:05 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-02-28 04:44:05 +0300 |
commit | 1470ebe6fa3900cb28266edf532d6e68707e1f24 (patch) | |
tree | 83d50dc80b178fc9658e346c7959ecbc8a251f2f /kvmd/plugins/hid/otg/keyboard.py | |
parent | a84b6bd31af52d13dcaf93717376852c784a2705 (diff) |
hid leds
Diffstat (limited to 'kvmd/plugins/hid/otg/keyboard.py')
-rw-r--r-- | kvmd/plugins/hid/otg/keyboard.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kvmd/plugins/hid/otg/keyboard.py b/kvmd/plugins/hid/otg/keyboard.py index 6c9ddfed..fb964d8a 100644 --- a/kvmd/plugins/hid/otg/keyboard.py +++ b/kvmd/plugins/hid/otg/keyboard.py @@ -68,7 +68,7 @@ class KeyboardProcess(BaseDeviceProcess): super().__init__( name="keyboard", read_size=1, - initial_state={"leds": {"caps": False, "scroll": False, "num": False}}, + initial_state={"caps": False, "scroll": False, "num": False}, **kwargs, ) @@ -98,11 +98,11 @@ class KeyboardProcess(BaseDeviceProcess): def _process_read_report(self, report: bytes) -> None: # https://wiki.osdev.org/USB_Human_Interface_Devices#LED_lamps assert len(report) == 1, report - self._update_state("leds", { - "caps": bool(report[0] & 2), - "scroll": bool(report[0] & 4), - "num": bool(report[0] & 1), - }) + self._update_state( + caps=bool(report[0] & 2), + scroll=bool(report[0] & 4), + num=bool(report[0] & 1), + ) # ===== |