I have trouble finding the offending code that sometimes holds down certain keys or modifiers (i.e. shift/alt/ctrl/win/capslock) and hangs my script.
Understand it is not best practice, but is there a way to check for and release all "sticky" keys if held for more than 1 second?
release all "sticky" keys if held for more than 1 second?
Re: release all "sticky" keys if held for more than 1 second?
Hallo,
Not exactly what you want but maybe?:
Not exactly what you want but maybe?:
Code: Select all
#Persistent
SetTimer, KeysReset, 1000
KeysReset:
IfGreater, A_TimeIdle, 1000, Loop, 0xFF
SendInput,% GetKeyState(Key:=Format("VK{:X}",A_Index))?"{" Key " up}":
Return