Gamepad buttons also have unique codes.
A=0, B=1, X=2, Y=3, LShoulder=4, LT=6, RShoulder=5, RT=7, LStick button=10, RStick button=11 etc.
If you are using sticks as left/right/up/down, then of course you will have to write some additional code to allow remapping them.