Alt + 空格 + 自动热键中的键

2024-01-20

我怎样才能创建一个Alt + Space + C自动热键中的快捷方式? Alt + 空格键是!space但我不知道如何添加第三个键而不出现错误。


您可以使用#If指令(需要 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

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意思是“不是错误级别”

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Alt + 空格 + 自动热键中的键 的相关文章

随机推荐