我想以以下方式配置自动热键:
Capslock::Esc
Capslock & C::
Run, www.stackoverflow.com
return所以,如果我按下Capslock,就像按Esc一样。另一方面,如果我同时按Capslock和c,它会调用用www.stackoverflow.com打开浏览器的函数。
此时,当我在脚本中有另一个函数时,重新映射似乎会中断。当我按下瓶盖时,它会将它切换一小段时间,所以单靠钥匙就什么也做不到。我没有拿到我的Esc。
另一方面,按下瓶盖+ A会激活瓶盖并产生真正的A。
有什么简单的方法可以解决这个问题吗?
发布于 2013-11-13 22:19:58
请查看以下代码:
inProcess = 0
Capslock::
Gui, 93:+Owner ; prevent display of taskbar button
Gui, 93:Show, y-99999 NA, Enable nav-hotkeys
inProcess = 1
KeyWait, Capslock ; wait until the Capslock button is released
Gui, 93:Cancel
if (inProcess == 1){
Send, {Esc}
}
Return
#IfWinExist, Enable nav-hotkeys
*c::
Run, www.stackoverflow.com
inProcess = 0
return
#IfWinExist, ; end context-sensitive block我修改了这里可用的答案:http://www.autohotkey.com/board/topic/56428-problem-rebinding-ctrl-to-capslock-using/
https://stackoverflow.com/questions/19964420
复制相似问题