The sdk
has the following methods (see CUE SDK documentation for full description)
Returns Number
: error code
sdk.CorsairErrorString[sdk.CorsairGetLastError()]
converts error code to string
Returns Number
: number of connected devices
Returns Object
: protocol handshake details
deviceIndex
- zero based device index
Returns Object | undefined
: device info
colors
- array of led color objects (e.g.,{ ledId: 1, r: 0, g: 0, b: 0 }
) (seeCorsairLedIdEnum.h
from CUE SDK package to get values forledId
)
Returns Boolean
: true for success
colors
- array of led color objects (e.g.,{ ledId: 1, r: 0, g: 0, b: 0 }
) (seeCorsairLedIdEnum.h
from CUE SDK package to get values forledId
)
Returns Boolean
: true for success
deviceIndex
- zero based device indexcolors
- array of led color objects (e.g.,{ ledId: 1, r: 0, g: 0, b: 0 }
) (seeCorsairLedIdEnum.h
from CUE SDK package to get values forledId
)
deviceIndex
- zero based device indexcolors
- array of led color objects (e.g.,{ ledId: 1, r: 0, g: 0, b: 0 }
) (seeCorsairLedIdEnum.h
from CUE SDK package to get values forledId
)
Returns Boolean
: true for success
Returns Boolean
: true for success
Returns Boolean
: true for success
Returns Boolean
: true for success
Returns Object[]
: array of led positions for keyboard. Can be empty if keyboard is not connected
deviceIndex
- zero based device index
Returns Object[]
: array of led positions for specified device. Can be empty if deviceIndex
is invalid
keyName
- single character, name of the key on keyboard
Returns Number
: led id
deviceIndex
- zero based device indexpropertyId
- id of property,sdk.CorsairDevicePropertyId
's member
Sets up a function that will be called whenever the event has occurred. Supported events are: macrokeydown
, macrokeyup
, deviceconnect
and devicedisconnect
onEvent(event)
- event listener specified as a callback function. The callback accepts a single parameter: an object describing the event which has occurred, and it returns nothing.
Returns Boolean
: flag indicating whether subscription was successful or not
Removes callback set by CorsairSubscribeForEvents()
call
Returns Boolean
: flag indicating whether unsubscription was successful or not