AutoHotInterception/Subscription Example.ahk

16 lines
292 B
AutoHotkey
Raw Normal View History

2018-03-06 19:53:04 +00:00
#SingleInstance force
#Persistent
#include Lib\AutoHotInterception.ahk
2018-03-30 18:04:58 +00:00
AHI := new AutoHotInterception()
2018-03-06 19:53:04 +00:00
2018-03-30 18:04:58 +00:00
keyboardId := AHI.GetKeyboardId(0x04F2, 0x0112)
AHI.SubscribeKey(keyboardId, GetKeySC("1"), true, Func("KeyEvent"))
2018-03-06 19:53:04 +00:00
return
KeyEvent(state){
ToolTip % "State: " state
}
^Esc::
ExitApp