问题
When I use the following , autohotkey says 'Error:Invalid hotkey". Is there any way to fix it?
_t::T
回答1:
AutoHotkey has Hotstrings and Hotkeys.
Hotstrings
What you have there is a "Hotkey" (e.g. a key on keyboard). As there is no such key it is indeed an error. So what do you want, do you want to type _t followed by a space, tab or other Endcharacter and have it replaced by T? In that case it is ::_t::T
so you need to start the line with a :
More about Hotstrings and various options here https://autohotkey.com/docs/Hotstrings.htm (you can have it send T without the need for typing an Endcharacter for example).
Hotkeys
If you want to press _ and t at the same type and have it send T that is a Hotkey and you should us a Custom Combination by using & like so _ & t::T
More information on Hotkeys here https://autohotkey.com/docs/Hotkeys.htm#combo
来源:https://stackoverflow.com/questions/48483509/how-to-set-underline-followed-by-a-character-to-send-another-key