When you config your controls, if you set cancel to whatever button/s you want. For example, when you are in a mame game and press 'TAB' it will come up with a menu where you can map controls. I mapped mine to cancel when I press 2 buttons together.
I have only just set up snes, in the pisnes9x config file you can change axis but cannot designate a one way axis... the joystick axis are already configured so you would have to rewire an axis to buttons i would assume to be able to configure them.
@hinchhinch sorry I should have been more clear. I meant to say controller. I just want to map 1 button on the controller to the keyboard key "ESC." That way I have a system wide way of escaping any of the emulators from the controller. I was thinking the Guide button. I tried remapping the xboxdrv config file, but no effect.
Is there a line I could add to /etc/rc.local to map a controller button to "ESC"?
If you hit the TAB button inside of an emulator, it should take you to a menu. You can then choose the UI buttons option on the menu, and then you can find the one for exit game or whatever you want to do, and change it to whichever button you want.