The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Corsair Utility Engine (CUE) 1.x and 2.x > CUE 1.x and 2.x SDK

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #31  
Old 01-05-2017, 12:56 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 885223
Darth Affe Reputation: 15
Default

I just published a new version (1.1.1)
https://github.com/DarthAffe/CUE.NET...ses/tag/v1.1.1

Nuget-packages are of course up2date.
  #32  
Old 01-10-2017, 10:14 AM
satukan satukan is offline
Registered User
 
Join Date: Jan 2017
Posts: 2
POST ID # = 886027
satukan Reputation: 10
Default

I would like to ask, is this API allows to hook / capture the extra G buttons presses in a C# application?
  #33  
Old 01-10-2017, 02:08 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 886062
Darth Affe Reputation: 15
Default

Well somehow. There is already a extension to do this (https://github.com/DarthAffe/CUE.NET.Input, but since I'm not sure if it works with all devices, I won't providing this as nuget or 'official' binary right now.

I attached you two zips:
The first is a demo application which allows you to test if the library works for you (I can't promise anything right now). Just run the keyboard test and you should get some sort of reactive typing.

The second is the current latest version.
To use it just reference CUE.NET.Input.dll and HidSharp.dll and install the CUE.NET nuget-package.
After adding the using "CUE.NET.Input" you should be able to register an input-handler by calling
Code:
CueSDK.KeyboardSDK.RegisterOnInput(MyKeyInputEventHandler);
the args passed to this provides the LedId and the Action (pressed or released).

You can also look at the example project - this is the code to the test-exe I attached.


If it works, it would be interesting to hear with which device you're using it!
Attached Files
File Type: zip InputTest.zip (220.7 KB, 61 views)
File Type: zip CUE.NET.Input.zip (120.2 KB, 67 views)
  #34  
Old 01-19-2017, 10:05 AM
satukan satukan is offline
Registered User
 
Join Date: Jan 2017
Posts: 2
POST ID # = 887504
satukan Reputation: 10
Default

Thanks Darth Affe, tried it out and looks like the SDK is initialized but there was no connection with the keyboard.
Probably cause of the targeted keyboard is a K95 vengeance (non RGB) type? Do you think the your shared SDK should work with it or another SDK belongs to it?

Meanwhile find a solution to set macros for the G buttons as "fake buttons" like F13 .. F24, but it's only 12 extra buttons and the rest of 6 still missing, so looking for something better.
  #35  
Old 01-19-2017, 10:50 AM
terabyte's Avatar
terabyte terabyte is offline
The Crazy Developer
terabyte's PC Specs
 
Join Date: Sep 2014
Location: Italy
Posts: 4,363
POST ID # = 887512
terabyte Reputation: 44
Default

Quote:
Originally Posted by satukan View Post
Thanks Darth Affe, tried it out and looks like the SDK is initialized but there was no connection with the keyboard.
Probably cause of the targeted keyboard is a K95 vengeance (non RGB) type? Do you think the your shared SDK should work with it or another SDK belongs to it?

Meanwhile find a solution to set macros for the G buttons as "fake buttons" like F13 .. F24, but it's only 12 extra buttons and the rest of 6 still missing, so looking for something better.
The K95 non-RGB does not have any official SDK support. Not sure if there is an unofficial one around, but this wrapper for sure won't work with it.
  #36  
Old 01-28-2017, 09:33 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 888883
Darth Affe Reputation: 15
Default

I just published a new version (1.1.2)
https://github.com/DarthAffe/CUE.NET...ses/tag/v1.1.2

Nuget-packages are of course up2date.
  #37  
Old 02-19-2017, 03:43 PM
DanteGrieco DanteGrieco is offline
Registered User
 
Join Date: Feb 2017
Posts: 1
POST ID # = 891979
DanteGrieco Reputation: 10
Default

Hi, I just wanted to know if there was a way to integrate game detection and game variables to the SDK, such as getting the health of your player and making a health bar based off of that onto the keyboard?
  #38  
Old 02-20-2017, 06:58 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 892055
Darth Affe Reputation: 15
Default

Quote:
Originally Posted by DanteGrieco View Post
Hi, I just wanted to know if there was a way to integrate game detection and game variables to the SDK, such as getting the health of your player and making a health bar based off of that onto the keyboard?
Well game detection/integration has nothing to do with the SDK.
Of course you can draw things like health bars with the SDK but you'd need to write your own game detection/integration to get the values you want to display.
  #39  
Old 03-18-2017, 05:13 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 895650
Darth Affe Reputation: 15
Default

I just published a new version (1.1.3)
https://github.com/DarthAffe/CUE.NET...ses/tag/v1.1.3

Nuget-packages are of course up2date.
  #40  
Old 03-27-2017, 08:19 AM
yanhuayu yanhuayu is offline
Registered User
 
Join Date: Jun 2015
Posts: 13
POST ID # = 897001
yanhuayu Reputation: 10
Default

what's this?

when i running

CueSDK.Initialize();

Quote:
at CUE.NET.CueSDK.Throw(CorsairError error)
at CUE.NET.CueSDK.Initialize(Boolean exclusiveAccess)
at Corsair_Effects_Engine.Corsair_Effects_Engine.GetDevice() in c:\users\documents\visual studio 2017\Projects\Corsair Effects Engine\Corsair Effects Engine\Corsair Effects Engine.cs:line 22
my code:
Quote:
public void GetDevice()
{
try
{
CueSDK.Initialize();
var keyboard = CueSDK.KeyboardSDK;
if (keyboard != null)
{

}
}
catch (Exception ex)
{

throw;
}

}
  #41  
Old 03-27-2017, 01:53 PM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 897037
Darth Affe Reputation: 15
Default

Well the interesting line of the error (most likely the first) is missing but from what I can see it seems like there is a problem with your CUE.
Is CUE installed and running?
Is the SDK-support in CUE enabled?
  #42  
Old 03-27-2017, 09:47 PM
yanhuayu yanhuayu is offline
Registered User
 
Join Date: Jun 2015
Posts: 13
POST ID # = 897109
yanhuayu Reputation: 10
Default

Quote:
Originally Posted by Darth Affe View Post
Well the interesting line of the error (most likely the first) is missing but from what I can see it seems like there is a problem with your CUE.
Is CUE installed and running?
Is the SDK-support in CUE enabled?
so i must install Corsair Utility Engine and running and enabled SDK-support in cue ?
  #43  
Old 03-28-2017, 05:57 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 897135
Darth Affe Reputation: 15
Default

Quote:
Originally Posted by yanhuayu View Post
so i must install Corsair Utility Engine and running and enabled SDK-support in cue ?
Yes, otherwise you the SDK won't work.
  #44  
Old 04-12-2017, 11:00 PM
Apathy420 Apathy420 is offline
Registered User
 
Join Date: Apr 2017
Posts: 4
POST ID # = 899129
Apathy420 Reputation: 10
Default

Quote:
Originally Posted by Darth Affe View Post
Current version: 1.1.3

You'll always find the latest release on nuget https://www.nuget.org/packages/CUE.NET/ or (sometimes older) releases at https://github.com/DarthAffe/CUE.NET/releases/latest and the source at https://github.com/DarthAffe/CUE.NET

The documentation and examples still needs some work.
You can find the things I've done so far at https://github.com/DarthAffe/CUE.NET/wiki or the code-documentation at http://cue.wyrez.org.

Features:
  • Full Control over the LEDs of your SDK-supported Corsair-Devices through a C#-API
  • By-key-access to every supported led or grouping in regions/lists
  • Comprehensive render-engine based on brushes to allow easy drawing over multiple leds.
  • Effect-engine to animate brushes or groups of leds
  • Currently in development: Input-module to capture all key-/button-presses (including G- and other special-keys)
Can I get an example on fading leds? I have tried setting a brush and adjusting the opacity of it. Doesn't work. I tried setting a color with different alphas and it doesnt fade. Help me out.
  #45  
Old 04-13-2017, 06:03 AM
Darth Affe's Avatar
Darth Affe Darth Affe is offline
//TODO add user title
Darth Affe's PC Specs
 
Join Date: Sep 2015
Location: UTC+1
Posts: 127
POST ID # = 899146
Darth Affe Reputation: 15
Default

Quote:
Originally Posted by Apathy420 View Post
Can I get an example on fading leds? I have tried setting a brush and adjusting the opacity of it. Doesn't work. I tried setting a color with different alphas and it doesnt fade. Help me out.
The approach of changing the opacity is good, for me it sounds lie you didn't set a "background-color" so there is nothing to shine through that opacity.

Code:
CorsairKeyboard keyboard = CueSDK.KeyboardSDK;
keyboard.Brush = new SolidColorBrush(Color.Black); // Black background - this will allow the foreground to fade away
ILedGroup keyboardLeds = new ListLedGroup(device, device); // replace this if you don't want to fade all leds
keyboardLeds.Brush = // add your brush here and change it's opacity. Don't forget to call 'CueSDK.KeyboardSDK.Update()' afterwards or set the UpdateMode to Continuous to enable auto-updates
 

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 02:23 PM.


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