The shrug-man is correct. You need the keyboard to enter names. However I am usually just 'v' as that is my player 2 button 1 key:)
You can setup two button you currently have to mo0use buttons instead of keyboard buttons, just make sure in mame you remap controls.
What I have done is map player 1 button 1 on my cp to enter. Player 1 buttons 1 and 2 are my mouse buttons on a flip of a swich. however I might be changing that so they are permanently mouse buttons and button 3 is enter.