Anyway, I quickly looked through my emulators and there are NONE which I have configured which require different keypresses to pause and unpause, although there are some emulators which use some of the following to toggle pause on/off:
1) LAlt
2) Ctrl-P
3) Esc
4) P
5) F1
6) F2
7) F12
Backspace
I don't see any problem with those keys. I was thinking there might be some emulators that use Alt-F4 rather than Esc to exit. (That won't be a problem either.)
What can be a problem is if you have an emulator that uses the same key for pause and exit, but I doubt that you will.
Anyway, I will definitely get back into this a bit later ..... I need to sit down and look into the script stuff so I can understand exactly the changes you are making to determine whether a solution will work for me for all my emulators (or most all of them).
If you mouse over the script code on my webpages, I have "ToolTips" (enable javascript in your browser) that explain what each line of the script does.
One thing I was getting at earlier is that you can re-map keys with the script, but with that many combinations I suspect you are re-mapping your CP with an I-PAC or similar anyway. At risk of confusing you further -
Let's say you have a button on your control panel mapped to "Backspace" and your emulator currently uses "P" to pause -
You could either:
1) Modify the emulator so that Pause was activated with Backspace instead of P and set up the script so the keys to display the image were active when Backspace was pressed. (if the Emu allows you to remap the Pause key).
2) Modify the I-PAC so that the button mapped to Backspace now sends P when that Emu is called, and set the script up so that P allows the image to be displayed after P is pressed.
3) Leave the I-PAC and Emu alone and modify the script so that when Backspace is pressed, the script actually sends P to the emulator to pause it and allow the image to be displayed.
Any method is about as easy as any of the others (Option 1 won't work with many Emu's and Option 2 is probably better at this point, as I suspect you already have I-PAC mappings and would want to both change those and configure a new script.)
In closing (for now), just so you are aware - based on the fact that you probably want a different image for each Emu, and most of them use different keys for pause, and what I can tell about Mala, I fully expect that you will end up with:
1) A slightly different version of the script for each emulator that you use.
2) A different batch file that will be used to call each emulator.
3) Modifications to Mala to call the different batch files (might not be required if you are already using Mala to call batch files to re-config the I-PAC prior to launching the emu - in which case you would just mod your existing batch file to add a call to start the script.)
4) Scripts are usually a trial-and-error thing for me. Modify this, try it out, didn't work, change this, almost works, change this - Golden!!!.
The good side to this:
1) Can be done in stages - Absolutely no reason you can't get this working for Z26 and still play your MAME games, then add it for ZSNES, then add it for MAME - etc.
2) Should be easier to add for other Emu's once you get the first one added.
3) Once you get it set up - you will have a consistent setup for ALL your Emu's and it should be easy for the user to understand. For example, you could pretty easily end up with this setup (in ANY Emu) (I am going to assume you have a dedicated orange pause button and red exit button, but if you use the I-PAC shift function you can continue doing that as well).
a) Press Orange button to pause game.
b) Press any other button on the CP to display the controls (even the red one) (on a per-game basis if the Emu uses different controls for different games)
c) Press any button besides the orange one to return to the paused game.
d) Press the orange button again to unpause the game.
e) Press the red button to exit back to Mala.
f) Select any other game to play and continue.
Just post back in here when you get ready to spend some time with this. (Hopefully I'll remember better what I did next time around).