The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Corsair Utility Engine (CUE) > CUE SDK

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 12-16-2016, 06:13 AM
ionflux ionflux is offline
Registered User
 
Join Date: Dec 2016
Posts: 7
POST ID # = 882705
ionflux Reputation: 10
Default 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...

I only know python, but having a working example in another language, I could tweak it to my liking I guess...
thanks very much!
Reply With Quote
  #2  
Old 12-26-2017, 02:20 AM
Shatterd69 Shatterd69 is offline
Registered User
 
Join Date: Jun 2016
Posts: 3
POST ID # = 932330
Shatterd69 Reputation: 10
Default 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.
Reply With Quote
  #3  
Old 12-28-2017, 10:12 PM
micky2171 micky2171 is offline
Registered User
micky2171's PC Specs
 
Join Date: Dec 2017
Location: Durham, United Kingdom
Posts: 12
POST ID # = 932757
micky2171 Reputation: 10
Default

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

Mick
Reply With Quote
  #4  
Old 12-28-2017, 11:37 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 472
POST ID # = 932767
hastegag Reputation: 10
Default

Quote:
Originally Posted by micky2171 View Post
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...
Reply With Quote
  #5  
Old 01-03-2018, 05:08 AM
Comet ☄'s Avatar
Comet ☄ Comet ☄ is offline
Witch
Comet ☄'s PC Specs
 
Join Date: Feb 2016
Location: San Francisco Bay Area, California, U.S.A., Earth, Solar System, Orion Spiral Arm, Milky Way Galaxy, Local Group, Local Sheet, Local Volume, Virgo cluster, Virgo Supercluster, Laniakea Supercluster, Universe
Posts: 872
POST ID # = 933495
Comet ☄ Reputation: 10
Send a message via Yahoo to Comet ☄
Default

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.
Reply With Quote
  #6  
Old 01-04-2018, 08:59 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 472
POST ID # = 933786
hastegag Reputation: 10
Default

Quote:
Originally Posted by Comet ☄ View Post
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).

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:20 AM.


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