adafruit / Adafruit_CircuitPython_HID

USB Human Interface Device drivers.
MIT License
364 stars 106 forks source link

Add shuffle mode #90

Closed qik33 closed 2 years ago

qik33 commented 2 years ago

Would it be possible to add shuffle to the available options?

I assume it's the RANDOM_PLAY function from the HID Usages and Descriptions document, so it would probably look like this (?):

RANDOM_PLAY = 0xB9 """Shuffle"""

Thanks!

dhalbert commented 2 years ago

We've avoid adding more constants to the library because each name makes the library larger, and there are hundreds of names. We are very tight on space on some of the smallest builds which still want to provide the library. You could just use 0xB9 as a constant, of course, it doesn't have to be named. Did it work for you?

This comment mentions where to look for more codes: https://github.com/adafruit/Adafruit_CircuitPython_HID/blob/c36ae716de1ad587142e3b09ef09206fffb2ab6d/adafruit_hid/consumer_control_code.py#L14-L18.

qik33 commented 2 years ago

Thank you, I got it to work by using the unnamed constant!