Update README.md

This commit is contained in:
Clive Galway 2018-03-12 23:56:49 +00:00 committed by GitHub
parent 2d4932dfe1
commit dcfc049204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,9 @@ F1::Msgbox You Pressed F1
#if
```
This hotkey would only fire if the `myVariable` was 1.
In context mode, you subscribe to a keyboard, and any time events for that keyboard are just about to happen, then AHI fires your callback, and you set this variable to `1` the hotkey is enabled. After your hotkey fires, AHI fires the callback again and the variable gets set back to `0`.
In context mode, you subscribe to a keyboard, and any time events for that keyboard are just about to happen, then AHI fires your callback and passes it `1`. Your code then sets the context variable to `1` which enables the hotkey.
AHI then sends the key, which triggers your hotkey.
AHI then fires the callback once more and the variable gets set back to `0`, disabling the hotkey.
#### Step 1
Register your callback with AHI