love.joystick

Provides an interface to connected joysticks.

Types

Joystick Represents a physical joystick. 0.9.0

Functions

love.joystick.close Closes a joystick. 0.9.0
love.joystick.getAxes Returns the position of each axis. 0.9.0
love.joystick.getAxis Returns the direction of the axis. 0.9.0
love.joystick.getBall Returns the change in ball position. 0.9.0
love.joystick.getHat Returns the direction of a hat. 0.9.0
love.joystick.getJoystickCount Gets the number of connected joysticks. 0.9.0
love.joystick.getJoysticks Gets a list of connected Joysticks. 0.9.0
love.joystick.getName Returns the name of a joystick. 0.9.0
love.joystick.getNumAxes Returns the number of axes on the joystick. 0.9.0
love.joystick.getNumBalls Returns the number of balls on the joystick. 0.9.0
love.joystick.getNumButtons Returns the number of buttons on the joystick. 0.9.0
love.joystick.getNumHats Returns the number of hats on the joystick. 0.9.0
love.joystick.getNumJoysticks Returns how many joysticks are available. 0.9.0
love.joystick.isDown Checks if a button on a joystick is pressed. 0.9.0
love.joystick.isOpen Checks if the joystick is open. 0.9.0
love.joystick.loadGamepadMappings Loads a gamepad mappings string or file created with love.joystick.saveGamepadMappings. 0.9.2
love.joystick.open Opens up a joystick to be used. 0.9.0
love.joystick.saveGamepadMappings Saves the virtual gamepad mappings of all recently-used Joysticks that are recognized as gamepads. 0.9.2
love.joystick.setGamepadMapping Binds a virtual gamepad input to a button, axis or hat. 0.9.2

Enums

GamepadAxis Virtual gamepad axes. 0.9.0
GamepadButton Virtual gamepad buttons. 0.9.0
JoystickHat Joystick hat positions.
JoystickInputType Types of Joystick inputs. 0.9.0

See Also


love.joystick.isOpen
  • References/Game Development/LÖVE/love.joystick

love.joystick.isOpen Removed in LÖVE 0.9.0 This function is not supported in that and later versions. Checks if the joystick is open.

2025-01-10 15:47:30
Joystick:getID
  • References/Game Development/LÖVE/love.joystick/Joystick

Joystick:getID Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the joystick's unique identifier. The identifier

2025-01-10 15:47:30
Joystick:getHatCount
  • References/Game Development/LÖVE/love.joystick/Joystick

Joystick:getHatCount Available since LÖVE 0.9.0 It has been moved from

2025-01-10 15:47:30
Joystick:isGamepad
  • References/Game Development/LÖVE/love.joystick/Joystick

Joystick:isGamepad Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets whether the Joystick is recognized as

2025-01-10 15:47:30
Joystick:getGUID
  • References/Game Development/LÖVE/love.joystick/Joystick

Joystick:getGUID Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets a stable GUID unique to the type of the

2025-01-10 15:47:30
love.joystick.getJoystickCount
  • References/Game Development/LÖVE/love.joystick

love.joystick.getJoystickCount Available since LÖVE 0.9.0 It has been renamed from

2025-01-10 15:47:30
love.joystick.getBall
  • References/Game Development/LÖVE/love.joystick

love.joystick.getBall Removed in LÖVE 0.9.0 This function is not supported in that and later versions. Returns the change in ball position.

2025-01-10 15:47:30
love.joystick.loadGamepadMappings
  • References/Game Development/LÖVE/love.joystick

love.joystick.loadGamepadMappings Available since LÖVE 0.9.2 This function is not supported in earlier versions. Loads a gamepad mappings string

2025-01-10 15:47:30
love.joystick.getNumHats
  • References/Game Development/LÖVE/love.joystick

love.joystick.getNumHats Removed in LÖVE 0.9.0 It has been moved to

2025-01-10 15:47:30
love.joystick.getHat
  • References/Game Development/LÖVE/love.joystick

love.joystick.getHat Removed in LÖVE 0.9.0 It has been moved to

2025-01-10 15:47:30