Jump to content
Corsair Community

AutoHotKey instead of iCUE


dstarr3

Recommended Posts

I am so fed up with iCUE, I either need to get rid of the software or get rid of this keyboard. Any help with figuring out how to use AutoHotKey instead of iCUE would be greatly appreciated.

 

I have a K95 RGB with the 18 programmable keys. My goal is to get rid of CUE, use just ordinary Windows keyboard drivers, and have AutoHotKey control all the G keys. But there seems to be a lot of difficulty getting AutoHotKey to recognize any G key presses without CUE running.

 

Does anyone know of a way to get AutoHotKey to recognize the G keys without having CUE running?

 

Thanks

Link to comment
Share on other sites

I have a K95 RGB with the 18 programmable keys. My goal is to get rid of CUE, use just ordinary Windows keyboard drivers, and have AutoHotKey control all the G keys. But there seems to be a lot of difficulty getting AutoHotKey to recognize any G key presses without CUE running.

 

You cannot AFAIK, but I would strongly recommend just using icue's latest version and then the SDK's register_callback example as I have here:

http://www.smithany.com/registercallbackwithtime.zip

 

Compiled for convenience in:

registercallbackwithtime.zip\CUESDK\examples\register_callback\x64\Release\

 

but the source is in there if you like. You need autohotkey to sniff for:

 

SC0C1::
;MsgBox G1
return
SC0C2::
;MsgBox G2
return
SC0C3::
;MsgBox G3
return
SC0C4::
;MsgBox G4
Return
SC0C5::
;MsgBox G5
Return
SC0C6::
;MsgBox G6
return
SC0C7::
;MsgBox G7
return
SC0C8::
;MsgBox G8
return
SC0C9::
;MsgBox G9
return
SC0CA::
;MsgBox G10
return
SC0CB::
;MsgBox G11
return
SC0CC::
;MsgBox G12
return
SC0CD::
;MsgBox G13
return
SC0CF::
;MsgBox G15
SC0D0::
;MsgBox G16
return

SC0D1::
;MsgBox G17
return
SC0D2::
;MsgBox G18
return

SC0D3::
;MsgBox M1
return
SC0D4::
;MsgBox M2
return
SC0D5::
;MsgBox M3
return
SC0D6::
;MsgBox M4
return
SC0D7::
;MsgBox M5
return
SC0D8::
;MsgBox M6
return
SC0D9::
;MsgBox M7
return
SC0DA::
;MsgBox M8
return
;E9-F5
SC0E9::
;MsgBox M9
return
SC0EA::
;MsgBox M10
return
SC0EB::
;MsgBox M11
return
SC0EC::
;MsgBox M12
return

 

I can explain how to use the last held time or the CUE profile getter if you need it, but generally AHK recognizes the up events I wrote like this:

+SC0CE Up::
;Shift G14 detect long press
profile := getCurProfile()
lht:=lastHeldTime()
if(profile == "Photoshop" && lht > 300) {
;...
return

 

and if you want, ymmv, but this is the essence of my profile getter and last held time:

 

global profilePointer:=0,lastHeldTimePointer:=0
ReadMemory(MADDRESS,PID)
{
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", PID, "UInt")
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "Ptr", MADDRESS, "Ptr", &MVALUE, "Uint",4)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
return, result
}
ProfileName(readNumber)
{
sendBackProfileName:=""
if(readNumber=0)
{
	sendBackProfileName:="Default"
}
else if(readNumber=1)
{
	sendBackProfileName:="UltraMod"
}
else if(readNumber=2)
{
	sendBackProfileName:="Sketchup"
}
else if(readNumber=3)
{
	sendBackProfileName:="Acrobat"
}
else if(readNumber=4)
{
	sendBackProfileName:="Dreamweaver"
}
else if(readNumber=5)
{
	sendBackProfileName:="Outlook"
}
else if(readNumber=6)
{
	sendBackProfileName:="Word"
}
else if(readNumber=7)
{
	sendBackProfileName:="Photoshop"
}
else if(readNumber=8)
{
	sendBackProfileName:="Bridge"
}
else if(readNumber=9)
{
	sendBackProfileName:="Illustrator"
}
else if(readNumber=10)
{
	sendBackProfileName:="Excel"
}
return sendBackProfileName
}

getCurProfile()
{
Process, Exist, register_callback.exe
PID:=ErrorLevel
if(profilePointer=0)
{
	FileRead, profilePointer, C:\CUESDK\examples\register_callback\x64\Release\Profile.txt
	profilePointer := "0x"+profilePointer ;front loaded zeros are ok but need to register string as hex
	WinHide ahk_exe register_callback.exe
}
;above line essential to run only once
Return ProfileName(ReadMemory(profilePointer,PID))
}
lastHeldTime()
{
Process, Exist, register_callback.exe
PID:=ErrorLevel
if(lastHeldTimePointer=0)
{
	FileRead, lastHeldTimePointer, C:\CUESDK\examples\register_callback\x64\Release\lastHeldTime.txt
	lastHeldTimePointer := "0x"+lastHeldTimePointer ;front loaded zeros are ok but need to register string as hex
}
return ReadMemory(lastHeldTimePointer,PID)
}

Edited by hastegag
  • Confused 1
Link to comment
Share on other sites

I got the same keyboard and did just find out that I couldn't use my "18 programmable keys" without iCue like I thought I could. :)

 

I am bit confused because I have a couple devices that keep there settings while iCue isn't running,

but they also have the option save to hardware profile if I remind it right.

 

So I test while I write this, and weird stuff is happening here :).

 

(Hardware Profiles appear on current devices after connecting new devices)

 

I started with the next devices connected

- K95 keyboard connected

- Harpoon wireless mouse

 

Then I started on my search for "save to hardware profile",

but I didn't see any hardware profile listed! in my list of profiles from the K95,

and the same does count for the harpoon wireless mouse, no hardware profiles.

 

So I grabbed some old devices and connected them to be sure the option still exists in this software version.

 

I connected the following devices :

- Scimitar PRO RGB

- Sabre RGB

 

After this the hardware profiles appeared on all devices, but....

The only device that did shown an option to save the hardware profile is the Scimitar PRO RGB.

 

My first idea was to try binding the keys F13/F24 to your G-keys,

then you have at least 12 keys to play with,

but there is and option for hardware profiles to save keys F13/F24 .... :(

 

I do also see no other option for binding any other uncommon keys,

otherwise you could have some workaround for your problem.

Edited by Danny van Liero
Link to comment
Share on other sites

  • Corsair Employee

K95 RGB does not have hardware profiles. Hardware profiles were introduced on the K95 RGB Platinum keyboard. The Sabre also does not have hardware profiles.

 

They do not have hardware profiles because they don't have the internal memory capacity to support that feature.

  • Confused 1
Link to comment
Share on other sites

Yes I have the old K95 and I love it. I own three actually, two I use daily, one is insurance.

 

My first idea was to try binding the keys F13/F24 to your G-keys, then you have at least 12 keys to play with, but there is and option for hardware profiles to save keys F13/F24

 

There are other remap options, maybe even 18+ of them if you can get the language keys to work for you, but you may eventually run out of off keyboard keys if you want to remap the memory buttons for example. But i still think the Register callback example is a better way since you can have AHK recognize modifier keys, or really any other key being pressed at the same time as the G or M keys. So that's a big upside right there if you are not taking your large keyboard between many different systems that are not yours.

Link to comment
Share on other sites

×
×
  • Create New...