Giter Site home page Giter Site logo

luacue's Introduction

LuaCUE

Corsair Utility Engine bindings for Lua. Standalone app and library.

This projects binds CUE SDK and wraps in Lua environment.

Built with LuaJIT 2.1.0-beta3 x32.

Consult with this page about enums and internal functions.

Unimplemented: DYI device channels.

API

Globals

ProtocolDetails

  • breakingChanges
  • sdkProtocolVersion
  • sdkVersion
  • serverProtocolVersion
  • serverVersion

CPUClock

Uses Windows CPU clock functions.

IsKeyDown

Uses Windows function GetKeyState.

printt

Prints table recursively with anti-loop protection.

LEDID

Converts A-Z to CorsairLedId. Yeah, only them.

CorsairDevice(number)

Returns CorsairDevice object. Indexes start from 1.

function Update()

General function for continuous actions.

function KeyboardInput(key, pressed)

Keyboard callback. Uses Windows hooks.

function DeviceStatusChanged(deviceID,connected)

Called when device changes state. (Connected / Disconnected)

function CorsairKeysInput(deviceID, pressed, keyID)

Corsair M and G buttons callback.

cue

CorsairDevice FindByDeviceID(deviceID)

string GetLastErrorString()

number GetDeviceCount()

boolean ReleaseControl()

boolean RequestControl()

number GetLastError()

CorsairError (CE_) enum.

SetPriority(number)

math

number math.Clamp(number, number, number)

CorsairDevice methods

__tostring

Prints CorsairDevice[index] [model].

string GetModel()

boolean IsValid()

Checks if internal pointers are valid. SDK didn't provide any solution to check, so it listens for DeviceStatusChanged callback.

string GetID()

HasCapability(number)

CorsairDeviceCaps (CDC_) enum.

number GetCapabilities()

CorsairDeviceCaps mask

number GetLEDsCount()

Number of controllable LEDs.

number GetAllLEDsCount()

The size of LED array.

number GetLogicalLayout()

CorsairLogicalLayout (CLL_) enum.

number GetPhysicalLayout()

CorsairPhysicalLayout (CPL_) enum.

number GetType()

CorsairDeviceType (CDT_) enum.

boolean IsTypeOf(number)

GetProperty(number)

CorsairDevicePropertyId (CDPI_) enum.

MapLEDs(function(ledID, x, y, w, h) return r, g, b end)

Function to set all LEDs.

SetLEDColor(ledID, r, g, b)

SetFlushLEDColor(ledID, r, g, b)

FlushLEDs()

number, number, number GetLEDColor(ledID)

Returns r, g, b.

table GetLEDs()

Returns all LEDs and their colors.

  • id
  • x
  • y
  • w
  • h

luacue's People

Contributors

gitspartv avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.