There are two modes of operation for AHI, currently each script can only use one of them.
### Context mode
Context mode is so named as it takes advantage of AutoHotkey's [Context Sensitive Hotkeys](https://autohotkey.com/docs/Hotkeys.htm#Context).
Context mode is so named as it takes advantage of AutoHotkey's [Context Sensitive Hotkeys](https://autohotkey.com/docs/Hotkeys.htm#Context).
In AHK, you can wrap your hotkeys in a block like so:
In AHK, you can wrap your hotkeys in a block like so:
```
```
@ -37,14 +40,14 @@ F1::Msgbox You Pressed F1
This hotkey would only fire if the `myVariable` was 1.
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 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`.