NicoHood / HID

Bring enhanced HID functions to your Arduino!
http://www.nicohood.de
MIT License
2.37k stars 409 forks source link

Documentation on proper use of LEDs in BootKeyboard #338

Open speendo opened 2 years ago

speendo commented 2 years ago

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:

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!

NicoHood commented 2 years ago

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.