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 04-07-2019, 06:25 PM
KingKielbasa KingKielbasa is offline
Registered User
KingKielbasa's PC Specs
 
Join Date: Apr 2019
Posts: 1
POST ID # = 1000680
KingKielbasa Reputation: 10
Default Macro to tap or hold for same key

I have a K70 Mk2 keyboard. I currently Have the lock button at the top left of the keyboard macro'd to open my VPN service, which auto connects when opened. I would also like to use the same key to run a .bat file that kills VPN process. How do i configure the lock button when held for 3 seconds to run the .bat file? And i want it to not do what it normally does when i press the key for less than 3 seconds (open the VPN again, when i want to close it). i hope that all makes sense.

thanks!
Reply With Quote
  #2  
Old 04-07-2019, 07:54 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 1000701
hastegag Reputation: 20
Default

for the macro keys, which i dont think your model has, you can use the SDK to do this, but there's no held length of time control I am aware of ... in some part because you could end up switching profiles during the held keypress.

If you would like Autohotkey to do this, there are a couple ways to achieve it, but they would require iCUE to remap the lock key to emit some other keypress.

The better option inside icue is for say a modifier key to temporarily switch profiles (say ctrl?) and then the lock button in your ctrl profile can just to the action to kill the VPN process.

If you do not have the physical ability to press both keys or would rather know how to avoid that, or avoid using cue to switch profiles first, then AHK can definitely fill in there. If you set iCUE to remap the lock button to a key that isnt one on your keyboard, like F13, then you can have Auothotkey sniff for F13:: as a hotkey and either use a toggle or a held timer with something like:

Code:
F13::
     if (A_TimeSincePriorHotkey < 500 && (A_PriorHotkey = A_ThisHotkey))
     {
         vpnClose() ;you need to write this
     }
else {
     vpnOpenIfNotOpen() ; you also need to write this
}
return
Reply With Quote
  #3  
Old 04-08-2019, 07:45 AM
Danny van Liero Danny van Liero is offline
Registered User
Danny van Liero's PC Specs
 
Join Date: Mar 2019
Posts: 24
POST ID # = 1000748
Danny van Liero Reputation: 10
Default

Do you really need the 3 seconds? :)
An other option can be to run some script when you press the key, this is possible
and let this script handle 2 states,
do if VPN == off
and do if VPN == on

Keeping the state in some other file, or you can check it by a ping to your VPN.

I dont see any other solution with iCue.
Reply With Quote
  #4  
Old 04-08-2019, 10:34 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 898
POST ID # = 1000760
hastegag Reputation: 20
Default

Quote:
Originally Posted by Danny van Liero View Post
and let this script handle 2 states
Genius! that is better
Reply With Quote
  #5  
Old 04-08-2019, 10:37 AM
Danny van Liero Danny van Liero is offline
Registered User
Danny van Liero's PC Specs
 
Join Date: Mar 2019
Posts: 24
POST ID # = 1000761
Danny van Liero Reputation: 10
Default

Nice! Hopes it works out for you! And thank you for the feedback! :)
Reply With Quote
Reply

Tags
icue, k70, keyboard, 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 08:01 PM.


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