Hardware test menu

I’ve got MAME running some NeoGeo games, using a xbox 360 controller and during games i am accidentally jumping into the hardware test menu. How can I stop this from happening?