Closed martelnov closed 1 year ago
hi,
with this driver you can only read the HID reports, so there is no software control on the leds, only physical (e.g. pushing the capslock/numlock/scrolllock keys should trigger the leds).
either you implement your own report parser from the raw USB data, or you extend the KeyboardReportParser
, as seen in the M5Stack USB Test example:
https://github.com/tobozo/ESP32-USB-Soft-Host/blob/main/examples/M5Stack_Grey_USB_Test/
I was traing it, but I cant use numeric block, numlock doesnt work for me...
well time to debug then :)
you will have to re-flash your ESP with Debug mode set to 'debug', and read the values printed in the console when using those keys
the current definitions for the lock keys are as follows, if you see different values printed in your console you may have to update them:
#define UHS_HID_BOOT_KEY_CAPS_LOCK 0x39
#define UHS_HID_BOOT_KEY_SCROLL_LOCK 0x47
#define UHS_HID_BOOT_KEY_NUM_LOCK 0x53
Hi,
I have updated the M5Stack_Grey_USB_Test example with a fix for capslock/numlock leds, just make sure you use the latest version of this library: https://github.com/tobozo/ESP32-USB-Soft-Host/releases/tag/v0.1.4
closing this as solved
Hello, Please, how to control leds and numlock and capslock?