You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
602 B
Plaintext
33 lines
602 B
Plaintext
6 years ago
|
#SingleInstance force
|
||
|
#Persistent
|
||
|
#include Lib\AutoHotInterception.ahk
|
||
|
|
||
6 years ago
|
global AHI := new AutoHotInterception()
|
||
6 years ago
|
|
||
6 years ago
|
keyboardId := AHI.GetKeyboardId(0x04F2, 0x0112)
|
||
6 years ago
|
|
||
6 years ago
|
AHI.SubscribeKey(keyboardId, GetKeySC("2"), true, Func("KeyEvent"))
|
||
6 years ago
|
|
||
6 years ago
|
cm1 := AHI.CreateContextManager(keyboardId)
|
||
6 years ago
|
return
|
||
|
|
||
6 years ago
|
KeyEvent(state){
|
||
|
static ctrlCode := GetKeySC("Ctrl")
|
||
|
global keyboardId
|
||
6 years ago
|
;~ AHI.SendKeyEvent(keyboardId, ctrlCode, state)
|
||
6 years ago
|
ToolTip % "State: " state
|
||
6 years ago
|
}
|
||
|
|
||
6 years ago
|
#if cm1.IsActive
|
||
6 years ago
|
::aaa::JACKPOT
|
||
|
1::
|
||
|
ToolTip % "KEY DOWN EVENT @ " A_TickCount
|
||
|
return
|
||
6 years ago
|
|
||
6 years ago
|
1 up::
|
||
|
ToolTip % "KEY UP EVENT @ " A_TickCount
|
||
|
return
|
||
6 years ago
|
#if
|
||
|
|
||
|
^Esc::
|
||
|
ExitApp
|