EspTinyUSB
EspTinyUSB copied to clipboard
Media Key Support?
Is there also Media Key support (planned)?
e.g., KEY_MEDIA_NEXT_TRACK , KEY_MEDIA_PLAY_PAUSE, KEY_MEDIA_VOLUME_UP ...
Best regards
Hi, it requires different or updated report map descriptor. For example keyboard class or composite class could be extended. Yes, that may be done eventually.
Do you have a rough idea of when you could bring media key support?
Well, this library is not very popular and now its not on top of my list to upgrade. Recently ive been playing with USB host (esp-idf), but temporary it is also on standby.
All depends what you want to achieve, but it is not hard to do it. Start with this class and for example replace mouse: https://github.com/chegewara/EspTinyUSB/blob/master/src/classes/hid/hidcomposite.cpp#L17-L20
here is example how it is done in tinyusb: https://github.com/hathach/tinyusb/blob/master/examples/device/hid_composite/src/usb_descriptors.c#L74-L80
Thanks for your support. But I'm a rooky. Do you have an easy example how to send the Media Key Message with the "Lib" hidcomposite.cpp?
No, and hidcomposite.cpp is not ready to send media keys. You would need to update library/class code to do it.
Hi chegewara,
may you help me in another direction. I need in one ESP32 application Mouse, Keyboard and Media Key support. I found the following libraries - but non off them supports all.
- The base from 2. and 3. from T-vK: Only support mouse OR Keyboard+Media in the same Arduino sketch
- Blackketter, based on T-vK: Mouse AND Keyboard support, but no Media Keys --> Fixed Mouse reconnection
-
Jakern, based on T-vK/Blackketter: Mouse+Keyboard+Media --> But problems with Mouse reconnection
I tried to combine the two libraries, see, in general it is working. But by changing
Keyboard.write( KEY_MEDIA_VOLUME_UP )
; orKeyboard.write( KEY_MEDIA_VOLUME_DOWN );
strage PC/Windows behaviour - seems to block timewise Win message system.
Do you have any idea. I seems, that all of the stuff before is based on your great experience, Best regards