如何解决AHK“$Alt & key”快捷键组合失败
在 AutoHotKey 中,我遇到了问题。我需要这个才能工作:
$Alt & w::Send ^w
我觉得这应该非常简单,但无论我如何尝试重新调整代码的快捷方式/热键侧(例如 {$Alt}、${Alt} 等),它都失败了。
注意 1:我不能简单地使用“!w::Send ^w”,因为“alt”按键会触发程序(菜单?),从而关闭整个程序,而不仅仅是活动窗口。所以我需要那里的 $。
注意 2:"$Alt" 本身可以正常工作,但与 "w" 键组合使用时会失败。
解决方法
#UseHook ; Does the same thing as '$'
SendMode Input
!w::Send ^w ; Don't use '&' with modifier keys like you did.
如果 Alt 打扰您,也许这会有所帮助:
; Asterisks: fire hotkeys even if extra modifiers are being held down.
*LAlt::return ; Nothing happens when you press 'LAlt'.
*LAlt Up:: ; On release it checks if the prior key was 'w'.
If (A_PriorKey == "w")
Send ^w ; If so,sends Control + W.
else Send {LAlt} ; If not,sends LAlt.
return
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。