File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,8 @@ def _remove_keycode_from_report(self, keycode: int) -> None:
162
162
@property
163
163
def led_status (self ) -> bytes :
164
164
"""Returns the last received report"""
165
- return self ._keyboard_device .get_last_received_report ()
165
+ # get_last_received_report() returns None when nothing was received
166
+ return self ._keyboard_device .get_last_received_report () or b'\x00 '
166
167
167
168
def led_on (self , led_code : int ) -> bool :
168
169
"""Returns whether an LED is on based on the led code
@@ -174,7 +175,7 @@ def led_on(self, led_code: int) -> bool:
174
175
from adafruit_hid.keycode import Keycode
175
176
import time
176
177
177
- # Initialize Keybaord
178
+ # Initialize Keyboard
178
179
kbd = Keyboard(usb_hid.devices)
179
180
180
181
# Press and release CapsLock.
You can’t perform that action at this time.
0 commit comments