ionflux Posted December 16, 2016 Share Posted December 16, 2016 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! Link to comment Share on other sites More sharing options...
Shatterd69 Posted December 26, 2017 Share Posted December 26, 2017 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. Link to comment Share on other sites More sharing options...
micky2171 Posted December 29, 2017 Share Posted December 29, 2017 I have only used the SDK for lighting effects, I’m not sure if you can listen for key clicks or not. Mick Link to comment Share on other sites More sharing options...
hastegag Posted December 29, 2017 Share Posted December 29, 2017 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... Link to comment Share on other sites More sharing options...
Comet 1626864951 Posted January 3, 2018 Share Posted January 3, 2018 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. Link to comment Share on other sites More sharing options...
hastegag Posted January 5, 2018 Share Posted January 5, 2018 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: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.