Giter VIP home page Giter VIP logo

cklua's Introduction

ckLua

Lua scripting for Corsair's RGB keyboards for Windows. Note that this program only works with 16.8m colors disabled in CUE

A pre-built binary of the program can be found here.

How it works

By using the Windows API messages sent from the keyboard are intercepted and read. Keys are mapped to strings (optional) and lighting codes. This information is passed directly to loaded Lua script.

Information

Only Windows is supported at the moment and I have no intention of porting it to any other operating system. However, the code is structured with the idea in mind that it should be as easy as possible to port. So feel free to fork my project and port it to whatever Lua runs on!

I have supplied example scripts to show how both scripts and key map files are structured. It should be relatively easy to create new key maps. If you create one, let me know and I will include it in my project (with proper credits of course).

Dependencies

This program uses the library from https://github.com/Palmr/LibCorsairRGB, and therefore libusb. Other than this you need Lua installed on your system to build.

How to use

The program uses C++/CLI. So you need to compile with /clr and /SUBSYSTEM:WINDOWS flags. You also need to include libusb, LibCorsairRGB and Lua.

As mentioned by Palmr, you might have to install drivers for libusb to get this program to work. Instructions on how to install libusb on windows can be found here.

Disclaimer

I am not responsible for any third party scripts used in conjunction with this application. By using this application with scripts from untrusted sources you are potentially running the risk of having a keylogger on your system, as with any application that reads hardware input.

Before using this application I strongly suggest you read through my source code and any third party script you are planning to use with application. This to reassure yourself that your personal information is safe. Keep in mind that I have no intentions of creating malicious applications and therefore will keep this project open source.

Any executables supplied by me corresponds to the source code. I still however recommend you to build the application on your own if you have the possibility.

Special Thanks

Figuring out the USB protocol is non of my work. I have used pre existing code by others to manage connection betwen input and lighting.

Credits goes to:

For supplying libraries and reverse engineering the communication to the keyboard.

cklua's People

Contributors

jeflux avatar saidkharboutli avatar

Stargazers

Jeremiah S avatar IE avatar Rabbit avatar  avatar Jordan Chapman avatar ezero avatar Darren McInnes avatar Tyler Jaacks avatar Andreas Niedermair avatar  avatar Dawid Urbański avatar Carter Gale avatar Alex Thomassen avatar Timothy Shores avatar Nameless Student avatar

Watchers

Alex Thomassen avatar Ismail avatar  avatar

cklua's Issues

Program doesn't open at all

I've tried to run it in any and all compatibility modes, tried messing around with the drivers using Zadig, all of which while CUE is closed, and the program just refuses to open. Nothing pops up; just a little loading circle where my cursor was for a moment and then nothing. No background process or anything.

Program hangs if there is no icon file

When I tried your binary build (haven't built it myself, yet) I found that it hung immediately. I started debugging it and found it was returning a FileNotFound exception. It was looking specifically for %USER%/icon.ico (in my case C:/Users/Peter/icon.ico).

The program started working fine after I copied one with that path/name.

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.