Thread: Simple lighting
View Single Post
Old 04-25-2016, 12:25 AM
Raichuboy17 Raichuboy17 is offline
Registered User
Join Date: Jul 2014
Posts: 10
POST ID # = 848906
Raichuboy17 Reputation: 10
Default Simple lighting

I assume that some of you are coming on here for very simple SDK stuff, or just learning programming and want a fun project for yourself. I am learning it on my own as part of a C/C++ learning tool so I will be uploading simple modifier things on here to use in conjunction with CUE.

Simple single color LED lighting:

CorsairLedColor BASE[n];
CorsairLedId KEY[n] = {/* CorsairLedIdEnum ID, example: CLK_A is key A */ }; //n = the number of keys you want to light up. Replace n with the number of keys you want to light up
for (int i = 0; i < n; i++) {
BASE[i].ledId = KEY[i];
BASE[i].r = 255;
BASE[i].g = 255; //Basic RGB values.
BASE[i].b = 255;

CorsairSetLedsColors(n, base); //If you want to add more colors just copy and paste this code, but make sure to change the name of BASE and KEY. They are just variable names.

//THIS DOES NOE SET ANY KEY YOU DO NOT LIGHT TO AN RGB VALUE OF 0, 0, 0. You will have to do that with a second one of these setting each one to 0, 0, 0 if you want them to be blank no matter what.

Last edited by Raichuboy17; 05-07-2016 at 03:46 AM. Reason: Changed what I wanted this thread to be about