Available since LÖVE 0.9.2
This function is not supported in earlier versions.
Due to a bug, any mapping that is a suffix of another (for example "x" is a suffix to "leftx") needs to be mapped first
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 )
string guid
GamepadButton button
JoystickInputType inputtype
number inputindex
JoystickHat hatdir (nil)
boolean success
success = love.joystick.setGamepadMapping( guid, axis, inputtype, inputindex, hatdir )
string guid
GamepadAxis axis
JoystickInputType inputtype
number inputindex
JoystickHat hatdir (nil)
boolean success
The physical locations for the bound gamepad axes and buttons should correspond as closely as possible to the layout of a standard Xbox 360 controller.
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.joystick.setGamepadMapping