You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ahk/_async/engine.py
+103-3Lines changed: 103 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,10 @@ def add_hotkey(
147
147
- If you add a hotkey after the hotkey thread/instance is active, it will be restarted automatically
148
148
- `async` functions are not directly supported as callbacks, however you may write a synchronous function that calls `asyncio.run`/`loop.create_task` etc.
149
149
150
-
:param hotkey: an instance of ahk.hotkey.Hotkey
150
+
:param keyname: the key trigger for the hotkey, such as ``#n`` (win+n)
151
+
:param callback: callback function to call when the hotkey is triggered
152
+
:param ex_handler: a function which accepts two parameters: the keyname for the hotkey and the exception raised by the callback function.
Copy file name to clipboardExpand all lines: ahk/_sync/engine.py
+103-3Lines changed: 103 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,10 @@ def add_hotkey(
143
143
- If you add a hotkey after the hotkey thread/instance is active, it will be restarted automatically
144
144
- `async` functions are not directly supported as callbacks, however you may write a synchronous function that calls `asyncio.run`/`loop.create_task` etc.
145
145
146
-
:param hotkey: an instance of ahk.hotkey.Hotkey
146
+
:param keyname: the key trigger for the hotkey, such as ``#n`` (win+n)
147
+
:param callback: callback function to call when the hotkey is triggered
148
+
:param ex_handler: a function which accepts two parameters: the keyname for the hotkey and the exception raised by the callback function.
0 commit comments