We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 12e642b + 9a65eac commit 4d68643Copy full SHA for 4d68643
adafruit_hid/keyboard.py
@@ -162,7 +162,8 @@ def _remove_keycode_from_report(self, keycode: int) -> None:
162
@property
163
def led_status(self) -> bytes:
164
"""Returns the last received report"""
165
- return self._keyboard_device.last_received_report
+ # get_last_received_report() returns None when nothing was received
166
+ return self._keyboard_device.get_last_received_report() or b"\x00"
167
168
def led_on(self, led_code: int) -> bool:
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
176
import time
177
- # Initialize Keybaord
178
+ # Initialize Keyboard
179
kbd = Keyboard(usb_hid.devices)
180
181
# Press and release CapsLock.
0 commit comments