I recommend reading the manual page for the Gamepad object..
A condition and expression combination that would be useful is:
Gamepad | on Gamepad(0) any button pressed > [variable] to Gamepad.LastButton(0)
so for example you can have a variable that stores the button ID for jumping, called 'JumpID' or something.
and for a custom controls screen it can prompt you for each button, one by one
a text object could read "press key for Jump"
and then have the event
Gamepad | on Gamepad(0) any button pressed > set JumpID to Gamepad.LastButton(0)
and then set the text object to read "press key for Attack"
Gamepad | on Gamepad(0) any button pressed > set AttackID to Gamepad.LastButton(0)
etc.
and then, to check if the jump button is pressed, you can use the condition
Gamepad | on Gamepad(0) button JumpID pressed/down