icue-controller

iCUE lighting controller

Usage no npm install needed!

<script type="module">
  import icueController from 'https://cdn.skypack.dev/icue-controller';
</script>

README

iCUE Controller

Corsair iCUE lighting controller for NodeJS; a wrapper for the cue-sdk library (https://www.npmjs.com/package/cue-sdk). Easily control the lighting in your Corsair iCUE products through NodeJS, and act on macro key presses for compatible mice and keyboards.

Prerequisites

Windows

macOS

Installation

npm i icue-controller

Usage

Example

const icue = require("icue-controller");
const colour = [100, 0, 255];

// Create new iCUE client
var client = new icue.Client();

client.on("connect", () => {
    var devices = client.devices;
    console.log(`Connected to ${devices.length} devices!`);

    // Loop through connected devices
    devices.forEach(device => {
        device.setColour(colour);

        // Log macro presses on iCUE compatible keyboards/mice
        device.on("macrodown", key => {
            console.log(`Macro key ${key} was pressed!`);
        });
    });

    // Push changes to LEDs
    client.update();
});

// Connect to iCUE
client.connect();

Make sure you always use Client#update to push your changes to the devices' LEDs.

Docs

Coming Soon