love.joystick.setGamepadMapping
Binds a virtual gamepad input to a button, axis or hat for all Joysticks of a certain type. For example, if this function is used with a GUID returned by a Dualshock 3 controller in OS X, the binding will affect Joystick:getGamepadAxis and Joystick:isGamepadDown for ''all'' Dualshock 3 controllers used with the game when run in OS X.

LÖVE includes built-in gamepad bindings for many common controllers. This function lets you change the bindings or add new ones for types of Joysticks which aren't recognized as gamepads by default.

The virtual gamepad buttons and axes are designed around the Xbox 360 controller layout.
success = love.joystick.setGamepadMapping( guid, button, inputtype, inputindex, hatdir )
guid string The OS-dependent GUID for the type of Joystick the binding will affect.
button GamepadButton The virtual gamepad button to bind.
inputtype JoystickInputType The type of input to bind the virtual gamepad button to.
inputindex number The index of the axis, button, or hat to bind the virtual gamepad button to.
hatdir (nil) JoystickHat The direction of the hat, if the virtual gamepad button will be bound to a hat. nil otherwise.
success boolean Whether the virtual gamepad button was successfully bound.
success = love.joystick.setGamepadMapping( guid, axis, inputtype, inputindex, hatdir )
guid string The OS-dependent GUID for the type of Joystick the binding will affect.
axis GamepadAxis The virtual gamepad axis to bind.
inputtype JoystickInputType The type of input to bind the virtual gamepad axis to.
inputindex number The index of the axis, button, or hat to bind the virtual gamepad axis to.
hatdir (nil) JoystickHat The direction of the hat, if the virtual gamepad axis will be bound to a hat. nil otherwise.
success boolean Whether the virtual gamepad axis was successfully bound.