@JoeViking245 I've a problem with the "esc" solution. I use Big Box, and I close the games not by using the esc key on computer keyboard, but by pressing the share button on my Nintendo Pro Controller (configured to "Close Active Window" in Big Box options). I use this as a "universal closer" to all emulators, because it makes everthing much easier.
I tested the script and BetterJoy will not close precisely because I'm not closing using the esc key. Any way around that?