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
  #16  
Old 02-11-2018, 04:48 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 # = 940082
Darth Affe Reputation: 15
Default

Quote:
Can I use the CUE SDK to assign different profiles to different keyboards?
No. The SDK has absolutely nothing to do with profiles. You can control the leds, and you can hook the G-keys. That's it.

Have you tried http://www.oblita.com/interception.html? I don't see any reason why this should have a device-limit.
  #17  
Old 02-11-2018, 04:59 AM
TaranVH TaranVH is offline
Registered User
 
Join Date: Feb 2018
Posts: 12
POST ID # = 940084
TaranVH Reputation: 10
Woah!

Quote:
Originally Posted by Darth Affe View Post
No. The SDK has absolutely nothing to do with profiles. You can control the leds, and you can hook the G-keys. That's it.

Have you tried http://www.oblita.com/interception.html? I don't see any reason why this should have a device-limit.
Yes. I've been using Interception for over a year now.
To get past the 10-device limit, you must pay $2200. Drivers (the best solution for multiple keyboards) must be licensed from Microsoft, and are not cheap.

https://github.com/oblitum/Intercept...ment-308619787

That's why I'm here. Since Corsair CUE is able to tell the difference between one of its own keyboards, and another manufacturer's keyboard, I thought it'd be able to tell the difference between two different Corsair keyboards.
  #18  
Old 02-11-2018, 09:27 PM
hastegag hastegag is online now
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 804
POST ID # = 940185
hastegag Reputation: 20
Default

@Taran I may be missing something, I get that you need to block the input from the multiply registered keyboards, and that Inception does the job up to ten, but it is based on the number of hid devices attached not keyboards, but I seem to think that Autohotkey could individually block each key's output prefixing the hotkey with ~, and I have not tested, but that should block regardless of where it came from?

Then inside of that blocking hotkey, first either readfile some state from a text file, or also check for the existence of a depressed off keyboard key (some arbitrary "modifier/meta/bucky/super" whatever you want to call it state).

The code I linked to above, if modified slightly could write to, or have some additional key depressed at the same time as each keyboard event and be executing specific code based on what keyboard handle the event came from.

Then autohotkey does the rest of the magic. I think that could work? I didn't get my 2nd k95 yet, busy day, but tomorrow, I am hopeful to get after it, but it should work and be nearly limitless in quantity? The only question would be if AHK blocks it quickly enough and reliably enough and implementing each specific handle dynamically and some other nuances.
  #19  
Old 02-13-2018, 03:06 PM
TaranVH TaranVH is offline
Registered User
 
Join Date: Feb 2018
Posts: 12
POST ID # = 940391
TaranVH Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post
@Taran I may be missing something, I get that you need to block the input from the multiply registered keyboards, and that Inception does the job up to ten, but it is based on the number of hid devices attached not keyboards, but I seem to think that Autohotkey could individually block each key's output prefixing the hotkey with ~, and I have not tested, but that should block regardless of where it came from?
The ~ prefix actually allows a key's normal function to pass through. It deliberately does NOT block the keypress.

In extreme cases, you can block ALL non-physical keyboard events if you really want to, but this has major drawbacks: https://autohotkey.com/board/topic/3...hid-functions/

I'm 99% sure that this solution would not work for me. Especially since I have like 200+ AHK functions, many of which are running continuously.
  #20  
Old 02-13-2018, 03:13 PM
TaranVH TaranVH is offline
Registered User
 
Join Date: Feb 2018
Posts: 12
POST ID # = 940394
TaranVH Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post

Adjusting the code should get what you'd need at least as far as a proof of concept (and I'm not saying there are not easier ways, but this noticed the difference between two separate keyboards):

https://www.codeproject.com/Articles...tiple-keyboard

the above compiles right out of the box beautifully without a hiccup.
I had that linked to from part 3 of my video series.

but I also had a link to this:
https://www.codeproject.com/Articles...elective#Chap5

Take a look at the serious problems that can arise from this solution...:
-Delay/desync between hook and rawinput messages
-Missing raw input messages
-Missing hook messages
-"Senseless" hook messages
-Multiplied hook messages
-The "altgr" problem

For these reasons, I've been pursuing a driver-based solution for quite some time now. Can we not just use the existing Corsair drivers.... somehow?
  #21  
Old 02-19-2018, 12:53 PM
hastegag hastegag is online now
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 804
POST ID # = 941363
hastegag Reputation: 20
Default

Quote:
Originally Posted by TaranVH View Post
For these reasons, I've been pursuing a driver-based solution for quite some time now. Can we not just use the existing Corsair drivers.... somehow?
My bad I clearly did not do my homework.

I tested it out today (finally), but I only tried with three keyboards. I simultaneously maxed out my Hid devices for the purpose of worst case scenario-ing

www.smithany.com/cewcew.jpg
www.smithany.com/3kb1.jpg
www.smithany.com/3kb2.jpg
www.smithany.com/rearloadout.jpg


I was able to run the intercept exe successfully with many hid keyboard devices showing up, but again that was only three keyboards.

I was able to confirm that the SDK was not able to determine the number of keyboards plugged in, so as of the time being, CUE or the SDK are not able to handle this.

Maybe this could be added in CUE 3 as that is on the horizon.

You mention the ten device limit and earlier in a post saying the corsair devices take up multiple hid slots. were you actually plugging in ten keyboards? or just like four? Maybe three corsair devices will exceed the allowable as i tested only with two corsair keyboards and one logitech.
  #22  
Old 02-19-2018, 03:57 PM
TaranVH TaranVH is offline
Registered User
 
Join Date: Feb 2018
Posts: 12
POST ID # = 941398
TaranVH Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post
My bad I clearly did not do my homework.

I tested it out today (finally), but I only tried with three keyboards. I simultaneously maxed out my Hid devices for the purpose of worst case scenario-ing

www.smithany.com/cewcew.jpg
www.smithany.com/3kb1.jpg
www.smithany.com/3kb2.jpg
www.smithany.com/rearloadout.jpg


I was able to run the intercept exe successfully with many hid keyboard devices showing up, but again that was only three keyboards.

I was able to confirm that the SDK was not able to determine the number of keyboards plugged in, so as of the time being, CUE or the SDK are not able to handle this.

Maybe this could be added in CUE 3 as that is on the horizon.

You mention the ten device limit and earlier in a post saying the corsair devices take up multiple hid slots. were you actually plugging in ten keyboards? or just like four? Maybe three corsair devices will exceed the allowable as i tested only with two corsair keyboards and one logitech.
Well, thanks a lot for your help. Looks like only Corsair can save us now.
I've already scripted a video: "An open letter to Corsair," asking them to add this feature, and explaining why it's even a good business idea.

Indeed, I only have 4 keyboards plugged in, and I already hit interception's limit. The K95 uses up 4 device drivers just on its own.
Then I have a numpad, the K120, and and Azio keyboard. That's 3 more.
The Palette Gear uses up another one.
Every MOUSE I've tried ALSO uses up a keyboard device driver...
So that's 9.
I keep #10 open so that I can plug in my ubikey when I need it. But sometimes, even that fails to work.
If you unplug a keyboard and plug it back in, that also counts as an additional device driver.

---------------------------

For future generations, I did find the key list I was looking for:
https://i.imgur.com/qNR9dhZ.png

You can go to Actions > Macro > Inert New Event > Keyboard Event > Keystroke > and then you can select a key from a big scrolly list. Here are the extra keys that I was looking for:

Application
NonUS_\
NonUS_~
Lang1
Lang2
Lang3
Lang4
Lang5
Lang6
Lang7
Lang8
Lang9
International1
International2
International3
International4
International5
International6
International7
International8
International9

And of course, it's got all the keys for both possible states of the numpad, (numlock on or off) and every function key all the way from F1 to F24.
I do NOT see any scan codes in there. Bummer.

When is CUE 3 going to be released?
  #23  
Old 04-26-2018, 05:37 PM
hastegag hastegag is online now
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 804
POST ID # = 952203
hastegag Reputation: 20
Default

Quote:
Originally Posted by TaranVH View Post
When is CUE 3 going to be released?
iCUE is out now, but does not appear (yet) to be able to force different registration between multiple keyboards unless I am missing something. Again i think that is due to the windows TLC with USB and Keyboards getting lumped into a single group regardless of the balance of their HID ids.

I just ordered an Infinitton to sit next to my corsair stuffs (hasn't arrived yet) which may further broaden my horizons. Hoping they have an integration with their ISE so i can slap a button on the scimitar mouse or the k95 and switch Infinitton's modes without changing focus on an application. Now I have to make a bunch of 72^2 icons tho...
  #24  
Old 05-30-2018, 09:32 PM
TaranVH TaranVH is offline
Registered User
 
Join Date: Feb 2018
Posts: 12
POST ID # = 956755
TaranVH Reputation: 10
Default

Just posting an update to this thread, for the benefit of all future people with the same obscure needs as I.

I figured out most of the stuff that I was trying to figure out. I was able to find 11 EXTRA keys that can be sent from a Corsair keyboard, and picked up by AutoHotkey, which can then run any script you like, of course.

Corsair's exact name for those extra keys are:

Keyboard Intl' 6
Keyboard Intl' 2
Keyboard Lang 2
Keyboard Lang 1
Keyboard Intl' 1
Keyboard Lang 4
keyboard Lang 3
Keyboard Intl' 4
Keyboard Intl' 5
Keyboard Intl' 3
Keypad , (Brazilian Keypad)

These are in a weird order, because I've ordered them by Scan Code. The scan codes for those keys are:

SC05C
SC070
SC071
SC072
SC073
SC077
SC078
SC079
SC07B
SC07D
SC07E

This and much more has all been documented by yours truly in a spreadsheet. Also, I found something disturbing: "Keyboard Lang 5" and "F24" both use the exact same scan code AND virtual key. Meaning that they are the exact same key. Meaning that "Keyboard Lang 5" it totally in the wrong spot. SC076 is totally reserved for F24. The Corsair dudes should probably look into this.

There are also 7 keys that a Corsair keyboard can send, that AHK seemingly does not notice at all. (making them useless for my purposes.)

Here's a screenshot of my findings:



You can download the entire excel document here:
https://github.com/TaranVH/2nd-keybo...can_codes.xlsx

By the way, if anyone knows what the heck the Keyboard Lang and Keyboard Intl' keys are actually FOR, please do let me know.
  #25  
Old 05-30-2018, 10:28 PM
hastegag hastegag is online now
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 804
POST ID # = 956763
hastegag Reputation: 20
Default

@TaranVH
Thank you for fighting the good fight!

I just bought a third k95 with 18 macro keys and even though it was more generally for "insurance" if i ruin my existing boards, it'd be dope to see if the codeproject article from Vít Blecha alongside the SDK could do something special with 2, even if it disregarded alt but tell the difference between the 2 kbs.

As i posted above, it can tell the difference between 2 kbs, so there has to be a different polling method that can set something whether a key is pressed on a certain USB device which can perform additional distinguishing tests.

I'm a week or two out on delivery of that third kb and explaining it to the intern (he's a smart kid and Im certainly not so swift) so i'm optimistic.

Like the Codeproject thing can save out a pointer to a location and say "I am device X" and something else can read it and say it was device X and if Y happens and it was device X instead of device Z, lets do this...
 

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 11:48 PM.


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