@zmanz It doesn't support the hotkeys you might have setup for retroarch emulators, but there is definitely a way to map the EXIT command to two buttons. You need to open up the MAME GUI menu (TAB) and edit the Inputs (General) then scroll down to UI Cancel which is usually mapped to Esc. Hit enter on this item, then press your two buttons at the same time. Wait a moment, and it should register a "1 5" for that function.
What you are doing is called a <CODE AND> boolean key map by pressing both buttons at the same time you are telling MAME you want the function to trigger only when both are pressed. If you don't move to another function, you can map another key, say for example that you want to also keep ESC mapped, you can add that one right after. If you move away to another mapping function and come back, it will be replaced.
You can do some pretty nifty stuff with <CODE AND> mapping as well as <CODE NOT> mapping (in which you double-tap a button to exclude it). With AND and OR and NOT combinations, it is possible to make a single joystick move a tank that would normally require two tank sticks.