This is a familiar frontend/emulator problem. A lot of emulators stick with the norm of using 'escape' to exit by default, and only a few allow assigning buttons to key functions like exiting the emulator.
Similarly, a lot of emulators do not like using the default mame keys for inputs, so whereas most people assign i-pac configs for each emulator, I reassign all of my emulators (including mame) to 'regular letter keys, assuring no input conflicts across the emulators.