On the encoder, I replace the first four default MAME keys (Left Ctrl, Left Alt, Space, Shift) with z,x,c,v.
Do this, then remap those four keys globally in MAME before setting up any individual games.
With an I-Pac, you can remap them on the encoder itself. With a key-wiz I just run the wire to the appropriate other connection.
It saves a lot of headaches down the road when you get to emulators, programs, or games where those keys either can't be mapped or cause issues.
Also no worries about triggering hotkey combos that would rotate windows and such.
Stick with ESC for exit on everything.