You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<
8000
button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">
classRGBLockStatus(LockStatus):
defset_lock_leds(self):
ifself.get_caps_lock():
print("Never print this when use a USB HUB")
defafter_hid_send(self, sandbox):
super().after_hid_send(sandbox)
print("always None when use a USB HUB: ", self.hid.get_last_received_report())
ifself.report_updated:
self.set_lock_leds()
Behavior
pass
Description
No response
Additional information
I use KMK as the firmware for the keyboard I made, but when I use a USB HUB, the Caps Lock light will not synchronize with other keyboards. The other two manufacturers' keyboards I tested can synchronize the Caps Lock light when using USB HUB. I read the definition of Class LockStatus and did some tests and found that get_last_received_report() always returns None when using USB HUB.
The above code is just a test code, please forgive me for not knowing how to trim KMK to minimize the executable code.
The text was updated successfully, but these errors were encountered:
There have been a lot of USB improvements between CircuitPython 9.2.7 and 10.0.0-alpha.6. Does anything change if you try your code with CircuitPython 10.0.0-alpha.6?
If you want to try writing a minimal program to reproduce the problem in CircuitPython (without KMK), these guides talk about how to use the usb_hid library:
The problem persists when using CircuitPython 10.0.0-alpha.6. The simple test code is as follows:
# code.py
# While this code is running, press the Caps Lock key on another keyboard once a second and observe if the output is different.
import time
import usb_hid
while True:
time.sleep(1)
print()
for device in usb_hid.devices:
x = device.get_last_received_report()
print(x)
After doing some tests, I found that this problem only occurs when this USB HUB is connected to the USB port on the front panel of the computer. Even if the HUB connected to my monitor in the middle, there will still be problems.
But when I plug the USB HUB into the USB port on the back of the computer and a laptop, there is no problem.
The strange thing is that the keyboard produced by another manufacturer works normally no matter how it is connected.
I will find a different USB HUB and test it again.
CircuitPython version and board name
Code/REPL
Behavior
pass
Description
No response
Additional information
I use KMK as the firmware for the keyboard I made, but when I use a USB HUB, the Caps Lock light will not synchronize with other keyboards. The other two manufacturers' keyboards I tested can synchronize the Caps Lock light when using USB HUB. I read the definition of Class LockStatus and did some tests and found that get_last_received_report() always returns None when using USB HUB.
The above code is just a test code, please forgive me for not knowing how to trim KMK to minimize the executable code.
The text was updated successfully, but these errors were encountered: