HID icon indicating copy to clipboard operation
HID copied to clipboard

Documentation on proper use of LEDs in BootKeyboard

Open speendo opened this issue 3 years ago • 1 comments

I plan to use this library for a case in which my Arduino reacts to a message from the host computer and replies with a sequence of key strokes.

As far as I know, the HID protocol is not really made for bidirectional communication. The keyboard LEDs might be an exception, as both parties (the host and the client) are able to set and read the status of the LEDs. With this workaround, I should be able to exchange some kind of information between the computer and the arduino.

If possible, I would like to use "non standard" LEDs for this purpose (to be precise: I would like to avoid NUM LOCK, CAPS LOCK and SCROLL LOCK. However, in order to achieve this, I require information on how to write and read from other LEDs.

Here's what I found so far:

  • I found this example on how to address the CAPS LOCK LED
  • I found this issue on Keyboard LED documentation that should be added (the issue is closed in favor of this open issue)
  • I found a comment in the code that talks about 3 LEDs left for advanced, custom usage.

Can you provide me some information (or a link) on how this advanced, custom usage would work?

Thank you in advance and happy new year!

speendo avatar Dec 31 '21 17:12 speendo

I recommend you to use the serial connection for bidirectional communication.

RawHID is also an option, but currently not working with the library and nobody took the time to fix it yet. Feel free to do so.

NicoHood avatar Jan 03 '22 14:01 NicoHood