2012-08-16 169 views
2

如何在autohotkey中创建Alt + Space + C快捷键? Alt + Space是!space,但我没有看到如何在没有出现错误的情况下添加第三个密钥。Alt + Space +自动关键键

回答

5

您可以组合使用#If指令(requires AHK_L)与GetKeyState()功能:

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

Space & c::Traytip,, % a_thishotkey 

#If 

,或者您可以使用Keywait命令:

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

这也将引发Alt键 + 空间结果0.6秒后如果你不按C
如果这是不可取的,你可以写这样的:

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

!ErrorLevel的意思是 “没有的ErrorLevel”