and finally, when you get all your done, you need this in your advmame.rc file
Just make sure when you copy and paste the buttons, paste it in the same x/y location so when that button is pushed, it will be block on that same spot.
ui_helptag keyboard[0,1] 75 5 8 8
ui_helptag keyboard[0,2] 100 5 8 8
ui_helptag keyboard[0,e] 29 55 8 8
ui_helptag keyboard[0,f] 38 47 8 8
ui_helptag keyboard[0,g] 49 47 8 8
ui_helptag keyboard[0,h] 60 47 8 8
ui_helptag keyboard[0,i] 38 37 8 8
ui_helptag keyboard[0,j] 49 37 8 8
ui_helptag keyboard[0,k] 60 37 8 8
ui_helptag keyboard[0,p] 145 55 8 8
ui_helptag keyboard[0,q] 136 47 8 8
ui_helptag keyboard[0,r] 125 47 8 8
ui_helptag keyboard[0,s] 114 47 8 8
ui_helptag keyboard[0,t] 136 37 8 8
ui_helptag keyboard[0,u] 125 37 8 8
ui_helptag keyboard[0,v] 114 37 8 8
ui_helptag keyboard[0,x] 170 37 7 17
ui_helptag keyboard[0,y] 160 37 7 17
Just change the letters of your controls.
Mine is
P1 side buttons
e,f,g,h,i,j,k
P2 side buttons
p,q,r,s,t,u,v
of course 1,2 is the start buttons