CorsairOfficial / cue-sdk

Corsair iCUE SDK
https://corsairofficial.github.io/cue-sdk/
215 stars 23 forks source link

How do you get all KeyNames for a device #14

Closed mandray closed 3 years ago

mandray commented 3 years ago

I know you can convert a KeyName into a ID, but is there a way to get all KeyNames for each device

intrueder commented 3 years ago

Short answer: no, CUESDK does not provide this functionality.

But can you share your use-case to let me understand the problem better? Because if you know that some device is CDT_Keyboard and has more than 26 keys, key names will be ['A', ..., 'Z']

mandray commented 3 years ago

Our use case would be having a way to display the keys that can change colors allowing the user to select the ones they want in a user friendly way. The use case would be differentiating between a keyboard with a num pad vs one without and whether a mouse only has one changeable led vs 3 for instance.

intrueder commented 3 years ago

Have you considered using the CorsairGetLedPositionsByDeviceIndex function? CorsairLedPosition structure has the information you need - ledId

intrueder commented 3 years ago

Closing the issue, please feel free to reopen, if you will still have questions.