Main > Main Forum
Escape key now has to be held down two seconds to work. Sweet!
(1/7) > >>
mccoy178:
I hate accidental exits from games by my buddies or kids.  To combat this, I found a short AutoHotKey written by member "SpamMe', that made it so that doesn't happen so easily.  I now have to hold down the escape button for two seconds before the game will exit.  I love it.  I also set it up so that it automatically starts when the cabinet is turned on.  Here is how I installed it:

I first downloaded the Auto Hot Key program from www.autohotkey.com.  I then copied and pasted this text (from SpamMe) into a blank text document:


--- Quote ---;HoldEscape:

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,100
      {
         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


--- End quote ---

After that was done, I right clicked on the document, selected properties, and chose to have AutoHotKey open the file by selecting the program from the program files folder.  After that was done, I then copied the document, and put a copy in my startup folder which can be found by using the start menu.  Now it works like a champ! :applaud:  I have attached said .ahk file.  Just delete the .txt after downloading it.  Good luck fellas!
gamenut:
^^^^^^I was wondering about that :applaud:


Are there any alternatives?
ahofle:
You don't happen to have an IPAC do you?  I'm curious how this would function with the IPAC's shift functionality (if at all).  
mccoy178:
I have a keywiz max.  I don't think it matters because in the end, the ipac and the keywiz are both mapped to the escape key on the keyboard no matter what method it is taking to get there.  Does that make sense?
Lilwolf:
I went to mameplus a while ago on my cab.  Helped for a few items, but one of my favorites is that I have to confirm the exit. 

Since I haven't quit by mistake... before then, my daughter would do it all the time leaning against the cab.
Navigation
Message Index
Next page

Go to full version