chmod222 / libcmmk

An unofficial LED control API for Coolermaster Masterkey keyboards
GNU Lesser General Public License v3.0
100 stars 23 forks source link

Pro L White support #24

Closed bonnee closed 4 years ago

bonnee commented 4 years ago

I didn't add a new entry into cmmk_product_type since the White version is virtually identical to the RGB. The red channel sets the brightness. the other channels don't seem to tamper with the keyboard. The cycle effect isn't supported, and all the other effects are shifted upwards in the enum. That's not solved as of now, and should be common to all white leds keyboards. Only tested EU layout, but US should work fine.

sam97 commented 4 years ago

I have a US layout keyboard. Been meaning to do this for quite some time but couldn't get it to work. I'll test after work and let you know.

sam97 commented 4 years ago

So I tried testing this and I was swiftly reminded why I'd abandoned this project. It is extremely difficult to get this library running on Windows with Visual Studio, and I'm still facing issues getting it to reliably build and run. I also don't have a Linux machine with me atm, so I don't think I can test this right now.

Sorry if I got your hopes up. :)

bonnee commented 4 years ago

No worries! You could still setup a linux VM if you really want to test this, but otherwise there shouldn't be any big issues with the US layout. I've been running this patch for a few weeks inside an audio visualizer wrapper that I wrote, and it's running without a single problem. May I ask why you don't want to use the official SDK on Windows? That seems the obvious choice to me, but I don't run Windows so I don't really know

sam97 commented 4 years ago

Yeah, that or a bootable drive should work, actually. I might get around to it this weekend. But I think there won't be any issues, like you said.

The official SDK is, first of all, documented in what looks like Mandarin so I have trouble getting it to work. Even then, the SDK is not actually open-source; only the example program is open-source. So I don't really have control over what gets run. This project was crucial to me because it laid bare how to communicate with the keyboard. I think the SDK/tool for the RGB keyboard is more fleshed out so the author was able to write a new SDK from scratch, which I could not have done with the White keyboard's SDK. Thankfully, it seems like the White keyboard is just a watered-down version of the RGB keyboard so I can replace the official SDK with it and it will work.

chmod222 commented 4 years ago

Sorry about the long delay, I was busy-ish with life. Unfortunately I cannot test these changes, but I've gone ahead and merged them.