;HoldEscape: ; I was tired of people (and our cat) bumping the escape key ; by accident and came up with (some of) this script ; If the escape key is held for less than 2 seconds, ; it is ignored. ; To enable normal use of the key, hit escape 4 times ; within a second. Do the same to disable. ; Thanks to MYYM and Decarlo110 in this thread: ; http://autohotkey.com/forum/viewtopic.php?t=3993 toggletimer = 0 esckill = 1 SetKeyDelay, 10, 20 $esc:: if toggletimer = 0 SetTimer, resettimer, 1000 toggletimer++ if toggletimer > 3 goto, toggleesckill if esckill = 1 { tt=0 ; set time to 0 loop,83 ; check every .25 s { GetKeyState, s , esc, p if s=U Break tt+=25 sleep 25 } if tt>=2000 ; if key pressed for 2 or more sec { send, {esc} toggletimer = 0 sleep 1200 } } else { send, {esc} } return resettimer: toggletimer = 0 return toggleesckill: soundplay, *48 toggletimer = 0 esckill *= -1 sleep 500 return