-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
status indicators (Num, Caps) #11
Comments
I was able to set the indicator keys with those modifications:
uint8_t lockLeds = ...; // the LEDS byte from the message
//hidSelector is an HIDComposite-inherited class that I use to receive keyboard/mouse raw HID data
//the HIDBoot<> classes should have access to the same method
auto res = hidSelector.SetReport(0, 0, 2, 0, 1, &lockLeds);
//error result
if (res != 0)
{
Serial.print("[!!!!!!!] SetReport returned ");
Serial.print(res, HEX);
Serial.print(" for lock key state ");
Serial.println(lockLeds, HEX);
} The sketch files are here. Sorry if the code is a bit messy, but I hope it helped you. EDIT: I also set the Bluetooth module baud rate to 57600 instead do 115200, as I am using SoftwareSerial for communication and was worried about not receiving the data properly. At this speed it's very rare to the key state message to become corrupted. |
Thanks @ManoShu, I've use your idea to modify my sketch, now my kbd can display status indicator :D |
I noticed that while pressing NumLock it changes actually switches the status, but keyboard LED is not showing this.
Interestingly with the USBHIDBootKbd.ino Indicators work fine ( without switching it the status on the connected device)
I was trying to compere this code to Code here to USBHIDBootKbd (part of USB 2.0 shiled library, and could not isolate the difference.
Do you have any ideas on how to fix this ?
(Thanks a lot for the code and the effort!)
The text was updated successfully, but these errors were encountered: