icue-controller
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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, 50];

// 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 => {
        // Set colour for all LEDs in 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

Package Sidebar

Install

npm i icue-controller

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

19 kB

Total Files

15

Last publish

Collaborators

  • tommyskeff