From aaf07220cd105d382128649d9511f682a51a62f6 Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Tue, 21 Mar 2023 12:51:32 +0000 Subject: [PATCH] Add v2 Subscription example --- v2/Subscription Example.ahk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 v2/Subscription Example.ahk diff --git a/v2/Subscription Example.ahk b/v2/Subscription Example.ahk new file mode 100644 index 0000000..34779c9 --- /dev/null +++ b/v2/Subscription Example.ahk @@ -0,0 +1,18 @@ +#SingleInstance force +Persistent +#include Lib\AutoHotInterception.ahk + +AHI := AutoHotInterception() + +keyboardId := AHI.GetKeyboardId(0x04F2, 0x0112) +AHI.SubscribeKey(keyboardId, GetKeySC("1"), true, KeyEvent) +return + +KeyEvent(state){ + ToolTip("State: " state) +} + +^Esc:: +{ + ExitApp +} \ No newline at end of file