Conclusion: Hotkey (AutoHotkey) can have a maximum of 1 character key (alphanumeric) only, e.g.
- ^1 — accepted
- ^10 — fail
In order to use more that 1 character key, then refer to https://mobitek-system.com/blog/2020/06/autohotkey-how-to-define-2-alphabet-keys-as-hotkey/
More Information
For this hotkey defined in “.ahk” file
^1::
HOTKEY | SCRIPT EXECUTE? |
Press and hold <CTRL> then <1> | YES |
Press <CTRL> release it then press <1> | NO
When using 1 – 3 combination of modifier, holding down or click at the same time, eg: <CTRL><SHIFT>, this is considered as hotkeys / shortcut keys. When type 1 by 1 will be considered as character of strings (the same like when you type something) which usually use in hotsrings. but there is no other way to use modifier and key in hotstrings. “Hotstrings are mostly abbreviation expanders, designed to expand typed strings, not to create multi-key hotkey (a feature asked some times already, search “combo hotkey”).” (source: https://autohotkey.com/board/topic/13050-hotstring-containing-modifier/) |
Press both keys at the same time <CTRL> and <1> | YES
Considered as a combination of two keys like hold down <CTRL> then <1>. But if one key clicked first before the other, the script will not executed. Which is why autohotkey recommending hold down one key first (modifier) and then another key. Example: The output |
For this hotkey (3 keys) defined in ".ahk" file
^10::
Script will not execute and an error will receive