Alt + Space + key in autohotkey

断了今生、忘了曾经 提交于 2019-12-04 12:08:23
Honest Abe

You can use the #If directive (requires AHK_L) in combination with the GetKeyState() function:

#If GetKeyState("Alt", "p")

Space & c::Traytip,, % a_thishotkey

#If

or you can use the Keywait command:

!space::
keywait, c, d, t0.6
If ErrorLevel
    Traytip,, Alt and space
Else
    Traytip,, Alt space and c
Return

This will also trigger an Alt+space outcome after 0.6 seconds if you don't press C.
If that is undesirable you can write it like this:

!space::
keywait, c, d, t0.6
If (!ErrorLevel) {
    Traytip,, Alt space and c
    Sleep, 2000
    Traytip,, % a_thishotkey
} Return

!ErrorLevel means "not ErrorLevel"

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!