Update README.md

pull/1/head
Clive Galway 6 years ago committed by GitHub
parent a729dde42d
commit e3b12c1d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,3 +12,28 @@ AHI uses the Interception driver by Francisco Lopez
(You can optionally place the contents of the `lib` folder in `My Documents\AutoHotkey\lib`
4. Edit the example script, enter the VID and PID of your keyboard
5. Run the example script
# Usage
Include the library
```
#Persistent ; (Interception hotkeys do not stop AHK from exiting, so use this)
#include Lib\AutoHotInterception.ahk
```
Initialize the library
```
Interception := AutoHotInterception_Init()
```
Subscribe to a key on a specific keyboard
```
Interception.SubscribeKey(GetKeySC("1"), true, Func("KeyEvent"), VID, PID)
return
```
Callback function is passed state `0 (released) ` or `1` (pressed)
```
KeyEvent(state){
ToolTip % "State: " state
}
```

Loading…
Cancel
Save