This wrapper is based on an JNA interface generated by JNAerator.
The CueSDK
class provides some helper methods to access the most common needs from the native SDK, simplifying handling arrays of structs, etc.
package dk.allanmc.test;
import dk.allanmc.cuesdk.LedColor;
import dk.allanmc.cuesdk.CueSDK;
public class CueSDKExample {
public static void main(String[] args) throws InterruptedException {
// Establish connection with device
final CueSDK cue = new CueSDK(true);
// Set LED of the Enter key to red
cue.setLedColor(new LedColor(LedId.CLK_Enter, 255, 0, 0));
// Set LED of the left Shift key to green
cue.setLedColor(new LedColor(LedId.CLK_RightShift, Color.GREEN));
// Set color of multiple keys at the same time
cue.setLedsColors(Arrays.asList(
new LedColor(LedId.CLK_W, Color.YELLOW),
new LedColor(LedId.CLK_A, Color.YELLOW),
new LedColor(LedId.CLK_S, Color.YELLOW),
new LedColor(LedId.CLK_D, Color.YELLOW)
));
// Wait some time before exiting, so we can see the LEDs.
Thread.sleep(1000);
}
}
Instantiates a new CueSDK, and establishes a connection to the Corsair SDK with shared control.
Instantiates a new CueSDK, and establishes a connection to the Corsair SDK with shared or exclusive control.
- Parameters:
exclusiveLightingControl
— Whether exclusive light control is needed or not.
Get the number of connected devices compatible with the Corsair CUE SDK.
- Returns: number of devices
Retrieve information about a connected device.
- Parameters:
deviceIndex
— Index of the connected device to get information about - Returns: device information
Retrieve a list of available LED positions, including their id and physical properties.
- Returns: list of LED details
Set the color af several LED at the same time.
- Parameters:
ledColors
— List of LED identifiers and colors
Set the color of a single LED.
- Parameters:
ledColor
— LED identifier and color