Jump to content
LaunchBox Community Forums

MAME - Double Press Escape to Exit?


vaderag

Recommended Posts

False alarm - just solved it myself!

In Emulator Settings, under "Running Scripts" added the below

;Detect insert double press to send Escape
~Insert::
if (A_PriorHotkey <> "~Insert" or A_TimeSincePriorHotkey > 500)
{
    ; Too much time between presses, so this isn't a double-press.
    KeyWait, Insert
    return
}
Send {Escape}
return

Set my Exit button as Insert instead of escape (which means it functions as my fast forward under normal circumstances) and then double press Exits

How simple!

  • Like 1
Link to comment
Share on other sites

1 minute ago, Mr. RetroLust said:

There is an option in Mame somewhere where you need confirmation to exit, if you cant find it let us know.

I did actually find this too, but I didn't like it as it gave an alert which says "Press A or Enter" to confirm, (and Escape cancels) - none of which are meaningful on the arcade controls :)

  • Game On 1
Link to comment
Share on other sites

Actually just improved it.

Switched my button assignments so that the exit button functions as ESC as standard (for other emulators etc) and set Insert as Exit in Mame. This way I can have the one button have three functions - standard press is fast forward, double press is exit and Shifted press is Reset 👍

;Detect insert double press to send Inser. Insert set as Exit, Esc set as Fast Forward. Secondary Shifted set as F3
~Esc::
if (A_PriorHotkey <> "~Esc" or A_TimeSincePriorHotkey > 500)
{
    ; Too much time between presses, so this isn't a double-press.
    KeyWait, Esc
    return
}
Send {Insert}
return

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...