ok, this has been stumping me for a while but I always found a way to circumvent the issue, until now.... I can't find answers in the Mame docs either.
It turns out to really be best for my cab if player 1 button 1 is the Enter key. But, if I ever have to hit tab and give a game a custom setup (like for mortal kombat), it's impossible to assign an input as just simply the Enter key. It always gives it "Enter and Keypad Enter", so I have to push both at once on the keyboard for the button to work. Same thing happens with "left shift and right shift", "left alt and right alt", etc. for every key that has a duplicate.
Why is this happening?
btw it happens with different keyboards, and both in ps2 and usb, and for multiple versions of mame that I've tried.