Remapping MAME Command menu

Hi there,
I found a lot of info on how to remap the button to open the MAME Settings menu but nothing about remapping the button to open the MAME Command menu (Continue, Save…, Exit). By default, it opens with button 9 (left thumb) but I keep opening it accidentally while I play which is very annoying and I’d like to use another button to open this menu.
Thanks in advance for your help and keep up the great work!

In EmulationStation if you re-calibrate the controller in settings and make sure for select button you dont assign the thumb press value, it should update the record in gamecontrollerdb.txt and when you start advmame it should pickup and set the values correctly.
If it doesnt you may have to remove your game controller record from the /storage/.config/SDL-gamecontrollerDB/gamecontrollerdb.txt file and re-calibrate it.
Finding out the game controller info can be found using SSH and the command:

cat /proc/bus/input/devices |  grep -E -B 5 -A 3 "H\: Handlers=(js[0-9] event[0-9])|(event[0-9] js[0-9])"