The default IPAC4 uses the default mame settings which has (as you correctly pointed out) the same keystrokes mapped to some of 2p and 3p inputs. Winipac is the program you use to reconfigure the ipac mappings (making sure to actually update the ipac4 once everything is configured is important) and this can be downloaded from ultimarc. The version you download depends on when you got the ipac. So use winipac to set all the controls the way you want, you will then have to change the mappings in mame to match your new control set, plus any other emulator you are using.
Controls.dat is a way of recording the actual arcade controls (as shown by control panels, flyers, manuals and pinouts), what the controls do and how they are mapped in mame. eg
[1942]
gamename=1942 (set 1)
numPlayers=2
alternating=1
mirrored=1
tilt=0
cocktail=1
usesService=0
miscDetails=
P1NumButtons=2
P1Controls=8-way Joystick+joy8way
P1_BUTTON1=Fire
P1_BUTTON2=Loop
P1_JOYSTICK_UP=Up
P1_JOYSTICK_DOWN=Down
P1_JOYSTICK_LEFT=Left
P1_JOYSTICK_RIGHT=Right