The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > iCUE Software

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-05-2018, 03:36 AM
kurta999 kurta999 is offline
Registered User
kurta999's PC Specs
 
Join Date: Nov 2018
Location: Slovakia
Posts: 2
POST ID # = 979011
kurta999 Reputation: 10
Default Will iCUE support conditions in macros?

I own a K95 keyboard (not platinum, the older one - it has 18 macro keys) and I would like to bind two or three macro to one key, eg G3. (I need this for programming, to bind as many "keywords?" to a key as many I can. If I hit G3 quickly, type: "uint8_t", but If i hold it a bit down eg. 150ms, type: "int8_t")
Example:

- If I press & release it quickly, play macro 1.
- If G3 is pressed more than 100ms, then play macro 2.

For those advanced macros would be useful to add support for conditions in macro, like in programming. (IF, ELSE)

I'm just asking this question, because if this feature isn't planned in future, I'm going to do it myself with SDK.

Thanks!

Last edited by kurta999; 11-05-2018 at 03:39 AM.
Reply With Quote
  #2  
Old 11-05-2018, 09:49 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 979047
hastegag Reputation: 20
Default

Do it yourself in cop/c# with sdk or use autohotkey or both. It’s what I do. Now my current setup doesn’t register if a key is held down just when it was last hit but I think that can be done if you poll properly in the sdk register callback example.

You can create a context profile to switch to first if you like which I also do effectively doubling or increasing your macro keys especially with modifier keys

It’s a job I am sure to get it done on their end and probably not right around the corner giving the other moving parts so I’d try And set it up yourself

Last edited by hastegag; 11-05-2018 at 09:54 AM.
Reply With Quote
  #3  
Old 11-05-2018, 04:47 PM
dwjp90 dwjp90 is offline
Registered User
dwjp90's PC Specs
 
Join Date: Nov 2014
Posts: 22
POST ID # = 979095
dwjp90 Reputation: 10
Default

Yea, you can do that in the corsair software, kinda.

you just need to have it backspace out the old command, and then set the macro to run while held

Macro 1
sleep 100ms
clear macro 1
macro 2
Reply With Quote
  #4  
Old 11-05-2018, 04:50 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 979097
hastegag Reputation: 20
Default

Quote:
Originally Posted by dwjp90 View Post
Yea, you can do that in the corsair software, kinda.

you just need to have it backspace out the old command, and then set the macro to run while held

Macro 1
sleep 100ms
clear macro 1
macro 2
can you at your convenience post a working icue example? I'd like to learn how that works and I am not seeing a way to get there.

EDIT oh i get it now, you mean to actually backspace out what you typed during a while held macro...interesting idea. I like the context approach personally but that isnt a bad idea!

Last edited by hastegag; 11-05-2018 at 05:16 PM. Reason: i get it now
Reply With Quote
  #5  
Old 11-05-2018, 05:39 PM
dwjp90 dwjp90 is offline
Registered User
dwjp90's PC Specs
 
Join Date: Nov 2014
Posts: 22
POST ID # = 979108
dwjp90 Reputation: 10
Default

I like a real contextual option as well, but that was a good way to handle it
Reply With Quote
  #6  
Old 11-06-2018, 12:32 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 979147
hastegag Reputation: 20
Default

since we're on the topic in this thread and it at least sounds like OP knows what they are doing and because this is interesting to me, I wanted to add it to my own toolkit.

I was hoping to make a proof of concept to clock the keypress and then the keyrelease. From there it is somewhat gravy. I think I have it more or less.

Using internet examples from stack and cpp tutorials, using std::chrono and now() to set a start and end time and duration to subtract them. I tried to incorporate that from a fresh CUESDK register_callback.ccp example.

It works:
www.smithany.com/registercallbackwithtime.zip
see below, it is waay better

and looks like this:
www.smithany.com/pocfortimingmacrokeys.png

I feel like I would be more on the right track if I had a better handle on how to pass things into the lambda, but w/e, I could just make 30 different timers? Probably can lower the fidelity a bit to come off the processor. As is the first time is bad since I couldn't figure out how to pass the startTime into the lambda as part of the context or in the collection.

I'll keep playing with it.

Last edited by hastegag; 11-11-2018 at 05:03 PM. Reason: directing future viewers
Reply With Quote
  #7  
Old 11-06-2018, 02:56 AM
kurta999 kurta999 is offline
Registered User
kurta999's PC Specs
 
Join Date: Nov 2018
Location: Slovakia
Posts: 2
POST ID # = 979154
kurta999 Reputation: 10
Default

hastegag: Thanks for example project, it looks very interesting! But for me the SDK is the last option, because windows enviroment is unknown for me. I'm working with ARM microprocessors, so it's totally different.

dwjp90: LOL! I'm going to try this. Thanks!
Reply With Quote
  #8  
Old 11-10-2018, 02:03 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 979728
hastegag Reputation: 20
Default

EDIT: Cleaned it up and it is working great for anyone who finds this thread and is interested in timing your Macro Keys. This holds the key down and releases it approximately as you do and then outputs the time. AHK can see this and it corresponds with what the system sees as far as i can tell.

The clock stuff could probably be more accurate, but it doesn't seem too demanding on the PC and you're creating conditionals after all so you probably are only going to have something like if (held more than 500 ms) {do y} else {do x}.


www.smithany.com/register_callback.rar

Last edited by hastegag; 11-11-2018 at 05:01 PM. Reason: update
Reply With Quote
  #9  
Old 11-16-2018, 12:48 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 980703
hastegag Reputation: 20
Default

quick followup if anyone needs it or is interested:
www.smithany.com/timetest.ahk

spells out how to react to up events on macro keypresses in autohotkey with the above noted icue SDK project
Reply With Quote
Reply

Tags
k95 rgb conditional macro

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 04:56 AM.


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