Skip to content

CueSDK Class

Fiercest edited this page Apr 20, 2020 · 2 revisions

The CueSDK class is the main way of controlling your devices.

Constructors

CueSDK(CorsairAccessMode accessMode) //Creates a CueSDK and automatically activates a specified AccessMode. Can be null.
CueSDK(boolean exclusiveLightingControl) // Creates a CueSDK with exclusive lighting control enabled or disabled.
CueSDK() // Creates a CueSDK with no specific accessMode).

CueSDK Methods

//Utilities

int getDeviceCount() // Gets the number of connected devices compatible with the Corsair CUE SDK.

List<CorsairDevice> getDevices() // Gets a list of connected devices. Results are cached.

List<CorsairLedPosition> getLedPositions() // Gets a list of available CorsairLedPositions. Results are cached.

void ResetCaches() // Clear the caches of getDevices() and getLedPositions(). NOTE: This is also called when a device is connected/disconnected automatically.

//Lighting

void SetLedColors(Map<LedId, Color> colorMap) // Sets each LedId in the map to its mapped color.

void SetLedColor(LedId id, Color color) // Sets the specified LedId to a Color.

Color getLedColor(LedId id) // Gets the color of a specified LedId.

//Control

boolean RequestAccessControl(CorsairAccessMode accessMode) // Requests a specific CorsairAccessMode during runtime. Returns if the request was successful or not.

boolean ReleaseAccessControl(CorsairAccessMode accessMode) // Releases a specific CorsairAccessMode during runtime. Returns if the request was successful or not.

CorsairProtocolDetails GetSDKInfo() // Gets information regarding the SDK version.

//Event Callbacks

void RegisterKeypressCallback(Consumer<KeyCallbackEvent> callback) //Registers a callback whenever a G or M macro key is pressed. If one is already set, it will be overridden.

void RegisterDeviceChangedCallback(Consumer<DeviceRemovedEvent> callback) // Registers a callback whenever a device is connected/disconnected. Currently does not distinguish between what was connected/disconnected. If one is already set, it will be overridden.

void UnRegisterKeypressCallback() // Removes the KeyPress callback.

void UnRegisterDeviceChangedCallback() // Removes the Device Status Changed callback.
Clone this wiki locally