当我的控制键卡住时,我有几种情况,只有在我运行 AutoHotkey 时才会发生。这发生在多个不同的修饰键上,包括 control (^)、windows (#) 和 alt (!) 键。
类似的问题之前已经发过几次了:
1 ,
2 ,
3 .存在一些解决方案,并且 the one suggested here partially helped me (降低了问题出现的频率),但控制键仍然偶尔卡住。我尝试过的事情包括 #InstallKeybdHook .
我有两个问题:
我已经尝试了上面建议的所有方法,并创建了我自己的 StuckKeyUp 函数版本 (as suggested here) :
StuckKeyUp(){
sleep 300
send {<# up}
send {># up}
send {# up}
send {+ up}
send {<+ up}
send {! up}
send {<! up}
send {>! up}
send {^<^^>! up}
send {^<^>! up}
send {^ up}
send {Ctrl down}
send {Ctrl up}
Send {§ up}
Send {Shift Up}
Send {LShift Up}
Send {RShift Up}
Send {Alt Up}
Send {LAlt Up}
Send {RAlt Up}
Send {Control Up}
Send {LControl Up}
Send {<^ down}
Send {<^ Up} ; solves some issues, but not all
Send {>^ down}
Send {>^ Up}
Send {RControl Up}
Send {LControl Up}
Send {LWin Up}
Send {RWin Up}
sleep 100
; reload, ; Avoid - Reloading AutoHotkey File causes functions depending on this function to break
return
}
最佳答案
其他 debugging methods
你可以试试这个:
将此代码放在脚本中的特定位置(在发送控制键的热键定义中或在计时器中)
If GetKeyState("Ctrl") ; If the OS believes the key to be in (logical state),
{
If !GetKeyState("Ctrl","P") ; but the user isn't physically holding it down (physical state)
{
Send {Blind}{Ctrl Up}
MsgBox,,, Ctrl released
KeyHistory
}
}
并查看 KeyHistory(关闭消息框后)在哪些情况下 key 卡住了。
关于windows-10 - AutoHotkey 导致控制键卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49009176/