Jump to content
Corsair Community

K70/K95 RGB windows C++ library (unofficial)


palmr

Recommended Posts

Github: https://github.com/Palmr/LibCorsairRGB

 

Demos:

Testing:

[ame]

[/ame]

 

Snake on a keyboard:

[ame]

[/ame]

 

When the keyboard was announced there was mention of a lua library that customers could use to control the lighting programatically but as far as I know it hasn't been released yet.

Then I saw a few weeks ago on reddit that people had pretty much reversed the protocol and while someone did release a lua tool for Windows I couldn't find the source and not a great fan of arbitrary code running to modify my gear.

 

Since then I've seen a couple of Linux projects: The unofficial driver and an unofficial spectrograph; and figured it would be a fun weekend project to get that code working on Windows and have it as a library I could use in whatever language I like (that interops with native libraries).

 

My code is very rough as I'm not a C/C++ developer and I only have a K70 RGB (UK) to play with. But it seems to work fairly well, so I figured I'd post it here to see if anyone else was a windows user looking to play with their keyboard or if people know C++ and fancy letting me know how it should have been done, send me a pull request :)

Link to comment
Share on other sites

Nice work! Hopefully this will allow more devs to get working with the keyboard. Have you seen my newest commit to my visualizer repo? I added some functions from the other Reddit users' posts which allow USB transfers on Windows without using libusb. It would probably be good to add an option to build using that as well as libusb as you don't have to install the libusb filter driver using the Windows HID API method while libusb is more cross-platform.
Link to comment
Share on other sites

  • 2 months later...
Do you have any firmware issues where the keyboard lighting keeps hanging every now and then? If not, could you please tell me what firmware version you are using? I'm thinking of implementing Macro and G key support into a library for this keyboard but first I want to get those darned LEDS working like they are supposed to.
Link to comment
Share on other sites

  • 5 months later...
This thread might be showing some age but is this the most maintained/recent source available for unofficially programming the Corsair RGB boards?

 

It's not been maintained much, but then the firmware has only had one update since I posted this so not much maintainance needed!

 

I'm still active however, so if you want me to update it I could (things like other keyboard layouts or using CalcProgrammer1's suggested change to drop the libusb requirements) let me know :)

Though I'm sure by now people have come up with better options than my library, or maybe Corsair are closer to releasing their promised official LUA library?

Link to comment
Share on other sites

It's not been maintained much, but then the firmware has only had one update since I posted this so not much maintainance needed!

 

I'm still active however, so if you want me to update it I could (things like other keyboard layouts or using CalcProgrammer1's suggested change to drop the libusb requirements) let me know :)

Though I'm sure by now people have come up with better options than my library, or maybe Corsair are closer to releasing their promised official LUA library?

 

LUA has been placed on hold and will most likely never come :(

Link to comment
Share on other sites

It's not been maintained much, but then the firmware has only had one update since I posted this so not much maintainance needed!

 

I'm still active however, so if you want me to update it I could (things like other keyboard layouts or using CalcProgrammer1's suggested change to drop the libusb requirements) let me know :)

Though I'm sure by now people have come up with better options than my library, or maybe Corsair are closer to releasing their promised official LUA library?

 

better options? know any? :o: I don't want to sound like I'm downplaying your work X_x I'm just trying to find the ideal best/most supported unofficial program there is to start learning how to tinker and make my own things with it :o: much appreciated!

Link to comment
Share on other sites

better options? know any? :o: I don't want to sound like I'm downplaying your work X_x I'm just trying to find the ideal best/most supported unofficial program there is to start learning how to tinker and make my own things with it :o: much appreciated!

 

Someone used my library to make a Lua library which might be of use to you: https://github.com/Jeflux/ckLua

But as it uses my library there's probably still a few issues :P

 

As far as I know there's currently nothing official at all. The best supported code I know of would be the unofficial Linux driver: https://github.com/ccMSC/ckb

If I was to update my library I'd probably start by looking at their code to see what's new protocol-wise, if anything.

Link to comment
Share on other sites

  • 2 months later...
Github: https://github.com/Palmr/LibCorsairRGB

 

Demos:

Testing:

 

Snake on a keyboard:

 

When the keyboard was announced there was mention of a lua library that customers could use to control the lighting programatically but as far as I know it hasn't been released yet.

Then I saw a few weeks ago on reddit that people had pretty much reversed the protocol and while someone did release a lua tool for Windows I couldn't find the source and not a great fan of arbitrary code running to modify my gear.

 

Since then I've seen a couple of Linux projects: The unofficial driver and an unofficial spectrograph; and figured it would be a fun weekend project to get that code working on Windows and have it as a library I could use in whatever language I like (that interops with native libraries).

 

My code is very rough as I'm not a C/C++ developer and I only have a K70 RGB (UK) to play with. But it seems to work fairly well, so I figured I'd post it here to see if anyone else was a windows user looking to play with their keyboard or if people know C++ and fancy letting me know how it should have been done, send me a pull request :)

 

Could you make me a profile for black ops 2?

I would love to see these features:

I use these keys:

WASD(movin), Shift(run), strg/ctrl(sneak), Q(prone), tab(player list), 3(killstreak), 4(tactical), G(grenade), Y(chat), space(jump)

 

+ Team color on the rest of the keyboard or on the numpad

+ controls white

+ emp effect when emp used and it hits me the keyboard lights go off like the emp keyboard effect the other guy made

+ When in menu keyboard is off with matchin orange colors like diagonal waves

+ F keys are the ammo bar

+ Zombie mode: same with ammo and controls but team color is red

+ When hit by enemy or got dmg keyboard blink with red but does not affect f keys

+ print, scroll L, pause, insert, home, page up & down, delete end should light up for killstreak yellow

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...