Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Key Support? #33

Open
Hard-n-Soft opened this issue Apr 6, 2021 · 6 comments
Open

Media Key Support? #33

Hard-n-Soft opened this issue Apr 6, 2021 · 6 comments

Comments

@Hard-n-Soft
Copy link

Is there also Media Key support (planned)?

e.g., KEY_MEDIA_NEXT_TRACK , KEY_MEDIA_PLAY_PAUSE, KEY_MEDIA_VOLUME_UP ...

Best regards

@chegewara
Copy link
Owner

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.

@Hard-n-Soft
Copy link
Author

Do you have a rough idea of ​​when you could bring media key support?

@chegewara
Copy link
Owner

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

@Hard-n-Soft
Copy link
Author

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?

@chegewara
Copy link
Owner

No, and hidcomposite.cpp is not ready to send media keys. You would need to update library/class code to do it.

@Hard-n-Soft
Copy link
Author

Hard-n-Soft commented Apr 10, 2021

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.

  1. The base from 2. and 3. from T-vK: Only support mouse OR Keyboard+Media in the same Arduino sketch
  2. Blackketter, based on T-vK: Mouse AND Keyboard support, but no Media Keys --> Fixed Mouse reconnection
  3. 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 ); or Keyboard.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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants