The Corsair User Forums

The Corsair User Forums (https://forum.corsair.com/forums/index.php)
-   CUE 1.x and 2.x SDK (https://forum.corsair.com/forums/forumdisplay.php?f=271)
-   -   minimum working example needed (https://forum.corsair.com/forums/showthread.php?t=164272)

ionflux 12-16-2016 06:13 AM

minimum working example needed
 
Hi all!
could someone please post a minimum working example (along with some instructions on how to get it working) of how to apply logic on the keys?
e.g. if <this> modifier or key is pressed while in <this> profile, light <these> keys in <that> colour.
edit: or, if, say G4 is pressed, toggle its lighting AND perform a macro.

I'm hoping that sort of thing is possible with the sdk...:o:

I only know python, but having a working example in another language, I could tweak it to my liking I guess...
thanks very much!

Shatterd69 12-26-2017 02:20 AM

Looking for this too
 
Can someone please post a working example, or steps of how to get the LFX examples to run. I'm (honestly) 3rd year software eng, but can't seem to figure out what to do here on my own. I'm not sure what to do with this SDK folder, or how to compile.

micky2171 12-28-2017 10:12 PM

I have only used the SDK for lighting effects, I’m not sure if you can listen for key clicks or not.

Mick

hastegag 12-28-2017 11:37 PM

Quote:

Originally Posted by micky2171 (Post 932757)
I have only used the SDK for lighting effects, Iím not sure if you can listen for key clicks or not.

Mick

I jumped up and down when I heard it can! Darth Affe pointed it out that the newer SDK has the register callback example which hands it to us on a platter. I am not clear if it alone can "hook" keys that are normally in the 104, but it can recognize the G and M keys that are typically not addressable or recognizable without some hid magic...

Comet ☄ 01-03-2018 05:08 AM

You listen for key clicks exactly the same way you do for any other keyboard or mouse, by using your language's standard I/O functions. The CUE SDK extends this to allow to listen for the non-standard USB IO controls for G and M keys, but standard keys are handled just like your program would handle standard key input from any keyboard; this is not part of the Corsair SDK but part of your own computer language's library or native functionality.

The purpose of the Corsair SDK is primarily to set lighting on the Corsair device. So your program could listen to the keystrokes, and then use Corsair SDK to enable lighting on keys you specify, which could be exactly the keys you've received, or perhaps some sequence of keys.

The Corsair SDK has examples that would be used with Microsft Visual Studio, which knows how to interpret the various files found in the examples folder. The source code of the examples is written in C++ and can be found in the .cpp files.

hastegag 01-04-2018 08:59 PM

Quote:

Originally Posted by Comet ☄ (Post 933495)
The CUE SDK extends this to allow to listen for the non-standard USB IO controls for G and M keys.

Yup, editing register_callback example is huge for me, allowed me to (without having to switch profiles) extend the functionality of these keys with the "bucky bit" :_) modifiers and the same cpp application can poll for the current profile via static lighting even with key events triggered from the standard or media keys (my use case).

:biggrin:


All times are GMT -4. The time now is 04:39 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.