The Corsair User Forums  

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

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 12-12-2017, 10:19 AM
einzele einzele is offline
Registered User
 
Join Date: Feb 2015
Posts: 18
POST ID # = 930218
einzele Reputation: 10
Default remapping scimitar pro for continuous hold press

hi i have a problem with cue remap function that i want to ask u guys.
i assign each of the side buttons from "1" to "=" as macros to repeat constantly while pressed
then i remap dpi and profile switcher as a CTRL modifier
the idea is i want to just hold the side buttons 1 to keep repeating that action, and whenever i press dpi/profile switcher button, it will directly input "Ctrl + 1", while still holding the side button 1.
its simple, but somehow cue doesnt allow it because when i press the dpi/profile switcher button it automatically stops the input from the side button 1 that ive been holding. so i have to re-press the side button 1 after every time i press the dpi/profile switcher.
but it works if i press the Ctrl directly from keyboard, so the problem seems coming from the dpi/profile
anyone knows how to bypass this limitation? or is there anything not clear with my intention?

cheers

Last edited by einzele; 12-12-2017 at 10:31 AM.
Reply With Quote


  #2  
Old 12-12-2017, 05:39 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 896
POST ID # = 930263
hastegag Reputation: 20
Default

Quote:
Originally Posted by einzele View Post
its simple, but somehow cue doesnt allow it because when i press the dpi/profile switcher button it automatically stops the input
you are not alone, others have asked for this, but it does not appear to be a possibility from within cue alone. You can remap the side buttons to effect something that is visible to Autohotkey or a similar application and have it do what you need. You will need each scimitar side button to be remapped to a keystroke like F13 - F24 or something else that you are not using and then AHK can recognize those hotkeys

like
F13::
;stuff
return
and you should be good to go. let us know how you make out.
Reply With Quote


  #3  
Old 12-13-2017, 01:03 PM
einzele einzele is offline
Registered User
 
Join Date: Feb 2015
Posts: 18
POST ID # = 930364
einzele Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post
you are not alone, others have asked for this, but it does not appear to be a possibility from within cue alone. You can remap the side buttons to effect something that is visible to Autohotkey or a similar application and have it do what you need. You will need each scimitar side button to be remapped to a keystroke like F13 - F24 or something else that you are not using and then AHK can recognize those hotkeys

like
F13::
;stuff
return
and you should be good to go. let us know how you make out.
hi, thx for the reply. that sort of works, but i have found another problem
this is the script of one button that im using:
F13::1
$F13::
While GetKeyState("F13", "P")
{
Send, 1
Sleep, 25 ; every 50 miliseconds

i assign side button 1 as F13, then the ahk changes it into 1, which is used in game, and it repeats on hold just fine. it also repeats when i press any modifier key (ctrl, alt, shift) after holding the button 1, though somehow it also press the non modifier 1 as well. but it wont repeat the keystroke if i press the modifier key before holding down.
so its like this:
- holding 1 = repeat 1
- holding 1 then press Ctrl = repeat Ctrl + 1, and repeat 1 at the same time
- press Ctrl then holding 1 + only register Ctrl + 1 once
so can u tell me if there is anything wrong with the script?
Reply With Quote


  #4  
Old 12-13-2017, 05:12 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 896
POST ID # = 930404
hastegag Reputation: 20
Default

Quote:
Originally Posted by einzele View Post
hi, thx for the reply. that sort of works, but i have found another problem
this is the script of one button that im using:
F13::1
$F13::
While GetKeyState("F13", "P")
{
Send, 1
Sleep, 25 ; every 50 miliseconds

i assign side button 1 as F13, then the ahk changes it into 1, which is used in game, and it repeats on hold just fine. it also repeats when i press any modifier key (ctrl, alt, shift) after holding the button 1, though somehow it also press the non modifier 1 as well. but it wont repeat the keystroke if i press the modifier key before holding down.
so its like this:
- holding 1 = repeat 1
- holding 1 then press Ctrl = repeat Ctrl + 1, and repeat 1 at the same time
- press Ctrl then holding 1 + only register Ctrl + 1 once
so can u tell me if there is anything wrong with the script?
I am at work and didn't read the above but i will try and look at this later tonight or sometime soon, it may have to do with running it in parallel (maxthreads directive if i recall). You may want a single hotkey to run the evaluation on whether a modifier is pressed, i'll have to play with it.
Reply With Quote


  #5  
Old 12-13-2017, 11:59 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 896
POST ID # = 930454
hastegag Reputation: 20
Default

#MaxThreadsPerHotkey 2
Toggle = 0
$F13::
Toggle := !Toggle
While Toggle{
Send 1
sleep 25
}
return
$^F13::
KeyWait LCtrl, T0.1 ; Wait for user to release "F13" key
If ErrorLevel ; Still held down
While GetKeyState("LCtrl","p"){ ; While it is held down
Send )
Send 1
Sleep 25
toggle:=!Toggle
}
Else {; They let go case

}
return


Is that what you were looking to do? Also, this thread may help:

https://autohotkey.com/board/topic/6...tofire-thread/


Also above, i am sending ) because i didnt know what other key you were looking to fire...

Last edited by hastegag; 12-14-2017 at 12:00 AM. Reason: clarification
Reply With Quote


  #6  
Old 12-14-2017, 02:32 AM
einzele einzele is offline
Registered User
 
Join Date: Feb 2015
Posts: 18
POST ID # = 930473
einzele Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post
#MaxThreadsPerHotkey 2
Toggle = 0
$F13::
Toggle := !Toggle
While Toggle{
Send 1
sleep 25
}
return
$^F13::
KeyWait LCtrl, T0.1 ; Wait for user to release "F13" key
If ErrorLevel ; Still held down
While GetKeyState("LCtrl","p"){ ; While it is held down
Send )
Send 1
Sleep 25
toggle:=!Toggle
}
Else {; They let go case

}
return


Is that what you were looking to do? Also, this thread may help:

https://autohotkey.com/board/topic/6...tofire-thread/


Also above, i am sending ) because i didnt know what other key you were looking to fire...
your script somehow didnt work, i got error when i click run script.
but after reading through the link u post, i managed to get what i need.
basically i just make another script for each modifier, so it looks like this:

$F13::
While GetKeyState("F13", "P")
{
Send, 1
Sleep, 20
}

$^F13::
While GetKeyState("Ctrl", "P")
{
Send, ^1
Sleep, 20
}

$+F13::
While GetKeyState("Shift", "P")
{
Send, +1
Sleep, 20
}

$!F13::
While GetKeyState("Alt", "P")
{
Send, !1
Sleep, 20
}

that makes the script really long, because i also have those for the rest 11 side buttons. i just hope it wont crash in the long run.
is there any way to simplify it? maybe 1 script for all 3 modifier (yes, i use all 3 in game)?
Reply With Quote


  #7  
Old 12-14-2017, 11:45 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 896
POST ID # = 930530
hastegag Reputation: 20
Default

Quote:
Originally Posted by einzele View Post
your script somehow didnt work, i got error when i click run script.
but after reading through the link u post, i managed to get what i need.
basically i just make another script for each modifier, so it looks like this:

$F13::
While GetKeyState("F13", "P")
{
Send, 1
Sleep, 20
}

$^F13::
While GetKeyState("Ctrl", "P")
{
Send, ^1
Sleep, 20
}

$+F13::
While GetKeyState("Shift", "P")
{
Send, +1
Sleep, 20
}

$!F13::
While GetKeyState("Alt", "P")
{
Send, !1
Sleep, 20
}

that makes the script really long, because i also have those for the rest 11 side buttons. i just hope it wont crash in the long run.
is there any way to simplify it? maybe 1 script for all 3 modifier (yes, i use all 3 in game)?
Your script looks good to me with one exception, you need to add
Return
closing out each hotkey as far as i know, like after the closing brace and before your next passthru, modifier, and hotkey.

I don't tend to have problems with AHK once you get any bugs worked out - i use it every day and it is quite reliable. My scripts are diverse and thousands of lines, so i wouldn't sweat it. Worst thing that could happen is a crash or hang.
Reply With Quote


  #8  
Old 12-14-2017, 11:44 PM
einzele einzele is offline
Registered User
 
Join Date: Feb 2015
Posts: 18
POST ID # = 930635
einzele Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post
Your script looks good to me with one exception, you need to add
Return
closing out each hotkey as far as i know, like after the closing brace and before your next passthru, modifier, and hotkey.

I don't tend to have problems with AHK once you get any bugs worked out - i use it every day and it is quite reliable. My scripts are diverse and thousands of lines, so i wouldn't sweat it. Worst thing that could happen is a crash or hang.
something like this?

$F13::
While GetKeyState("F13", "P")
{
Send, 1
Sleep, 20
}
Return
$^F13::
While GetKeyState("Ctrl", "P")
{
Send, ^1
Sleep, 20
}
Return
$+F13::
While GetKeyState("Shift", "P")
{
Send, +1
Sleep, 20
}
Return
$!F13::
While GetKeyState("Alt", "P")
{
Send, !1
Sleep, 20
}
Return

i didnt notice any difference when i tried it before and after adding return during in game test tho, can u tell me what it is used for?
lol i just hope i wont get that crash during raid :D
Reply With Quote


  #9  
Old 12-15-2017, 11:27 AM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 896
POST ID # = 930683
hastegag Reputation: 20
Default

Quote:
Originally Posted by einzele View Post
i didnt notice any difference when i tried it before and after adding return during in game test tho, can u tell me what it is used for?
lol i just hope i wont get that crash during raid :D
Yeah definitely i get it, return means the code knows to stop executing what is below it, or to return to the calling function or in this case hotkey (sub).

It is good practice and will likely make your code more stable if you add to it.
Reply With Quote


  #10  
Old 12-17-2017, 02:10 PM
einzele einzele is offline
Registered User
 
Join Date: Feb 2015
Posts: 18
POST ID # = 930913
einzele Reputation: 10
Default

Quote:
Originally Posted by hastegag View Post
Yeah definitely i get it, return means the code knows to stop executing what is below it, or to return to the calling function or in this case hotkey (sub).

It is good practice and will likely make your code more stable if you add to it.
i see. ok seems my issue is resolved, many thanks to you for guiding me through it. cheers
Reply With Quote


Reply

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 12:50 PM.


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