Lukeyboy67 Posted July 13, 2018 Share Posted July 13, 2018 I use my gamepad to exit games in almost all of my emulators. I play MAME the most and find it really irritating having to hit escape when I wanna quit a game. Is there any way to do it? Cheers Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted July 13, 2018 Share Posted July 13, 2018 Launchbox's Controller Automation button combo will do this for you. The button combo sends the Escape command to the PC shutting down the emulator as long as it supports Escape to close it. Some emulators don't and in those cases an AHK script can be set for the emulator in LB to send the close emulator command to it. 1 Quote Link to comment Share on other sites More sharing options...
neil9000 Posted July 13, 2018 Share Posted July 13, 2018 You can also set the UI Cancel button in MAME to the same combo you use for everything else, and that will exit also. 1 Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted July 13, 2018 Share Posted July 13, 2018 Yeah that too, forgot that you can set a controller combo in Mame itself. 1 Quote Link to comment Share on other sites More sharing options...
Lukeyboy67 Posted July 14, 2018 Author Share Posted July 14, 2018 Thanks guys! can sit back now and relax Quote Link to comment Share on other sites More sharing options...
omlifecrew Posted July 16, 2018 Share Posted July 16, 2018 I agree it is annoying. How would one "escape" when using a control panel? Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted July 16, 2018 Share Posted July 16, 2018 Easy, you use a keyboard when setting it up and map a button or button combo of your choice in Mame or in LB. 1 Quote Link to comment Share on other sites More sharing options...
omlifecrew Posted July 16, 2018 Share Posted July 16, 2018 Ah ok that makes sense. Thanks Quote Link to comment Share on other sites More sharing options...
bman83 Posted July 18, 2018 Share Posted July 18, 2018 Hi Guys, JJ helped me by creating this ahk script for me. Holding joystick button 10 (my start button) for 5 seconds exits mame. $joy10:: ; my start button { keywait, joy10, t5 if errorlevel <> 0 { Send {esc down}{esc up} } } 2 Quote Link to comment Share on other sites More sharing options...
omlifecrew Posted July 19, 2018 Share Posted July 19, 2018 (edited) Super noob question I guess but I copied and pasted your ahk code into the ahk section of tools>"edit" emmulators in launch box. Then I changed your joy10 to my joy1 key in Mame which is mapped to my player 1 button. Loaded a game in Mame and tried to exit holding the key for 5 and it didn't exit. Any help would be appreciated. Is it because I already have that key mapped to "p1 start"? I also do not have premium version yet so I cannot set buttons in launch box as Lordmonkus suggested. Looked in mame64 but could not find an escape key to map a button to. Edited July 19, 2018 by omlifecrew Quote Link to comment Share on other sites More sharing options...
DOS76 Posted July 19, 2018 Share Posted July 19, 2018 Just go into MAME and set your own combo for the ui exit in MAME it will save you a bunch of hassle. 1 Quote Link to comment Share on other sites More sharing options...
omlifecrew Posted July 19, 2018 Share Posted July 19, 2018 Will try that! Quote Link to comment Share on other sites More sharing options...
bman83 Posted July 19, 2018 Share Posted July 19, 2018 To test ahk script open mame and press escape on keyboard to exit. Also go into control panel in windows and test game pad settings to make sure your button is number 1 Quote Link to comment Share on other sites More sharing options...
bman83 Posted July 19, 2018 Share Posted July 19, 2018 The script has a slight issue where he the game starts because you have credits in the machine or is on free play you may have to hold button again for 5 seconds. But will exit 99% of the time Quote Link to comment Share on other sites More sharing options...
neil9000 Posted July 19, 2018 Share Posted July 19, 2018 Its just much simpler to open the tab menu go to controls general/user interface/ find UI cancel and set whatever button or button combo you want. 2 Quote Link to comment Share on other sites More sharing options...
DOS76 Posted July 19, 2018 Share Posted July 19, 2018 yeah why use a 3rd party workaround for an emulator that has a built in solution. MAME doesn't like simulated keyboard presses that is why it is problemsome. Quote Link to comment Share on other sites More sharing options...
bman83 Posted July 19, 2018 Share Posted July 19, 2018 In my case I have 8 arcade button control panel for each player. So start and exit button is very useful. Fyi midway games save on mame exit so killing tasks in windows or alt f4 will not save your game Quote Link to comment Share on other sites More sharing options...
DOS76 Posted July 19, 2018 Share Posted July 19, 2018 On my arcade machine I have it set in Mame to use coin and another button simultaneously to exit from game. Using the UI cancel built into MAME isn't the same as using Alt-F4 basically you are taking the built in Escape function in MAME and adding it to a button combo so it is cleanly shutting MAME down. Whatever works for anyone is great but the simplest solution is to use the one built into MAME. 1 Quote Link to comment Share on other sites More sharing options...
omlifecrew Posted July 19, 2018 Share Posted July 19, 2018 Thank you all so much for the help. I didn't even know there was a "UI settings". Got my MAME exiting now in launchbox. Super excited. 1 Quote Link to comment Share on other sites More sharing options...
Lukeyboy67 Posted July 21, 2018 Author Share Posted July 21, 2018 Shoud've just read what Neil9000 said. 2nd post after my original question.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.