Page 1 of 1

USB keyboard does not receive leds

Posted: Tue Sep 03, 2024 8:55 am
by Veda88
I am using the "CompositeDevice" example in the arduino IDE. It has code to write events for the caps-lock, num-lock and scroll-lock to the console output. It also has code to press the caps-lock button when pressing the on-board button. The events for the leds are never written to the console. Not when I press the on-board button (I see the leds on my real keyboard change, so that works) also not when I press my real caps-lock button.

What can I do to get the led events? I'm using linux if that matters.

sudo evtest
and selecting
/dev/input/eventxx: Espressif Systems ESP32_S3_USB_OTG Keyboard
does show it is doing something with the caps lock led when pressing caps-lock on my real keyboard.

Re: USB keyboard does not receive leds

Posted: Thu Sep 05, 2024 2:52 pm
by Veda88
Looking into it a bit more I see that the USBVendor example also does not work correctly. I can see the device in my webbrowser, connect to it, but I cannot send/receive data from the webbrowser. In the serial port also no info. Only when I press the button I see Button Pressed or Button Released. So serial port works.

Is this a problem with my linux? lsusb does show the device, usbhid-dump does show the hid device as well.

Re: USB keyboard does not receive leds

Posted: Fri Sep 06, 2024 1:18 pm
by Veda88
Using esp-idf I can get the keyboard leds to work. Well alright, I will switch to that.