Module
love.joystick
This module provides access to information and events regarding joysticks, gamepads, steering wheels, and similar devices.

Since we need to deal with multiple joysticks on the same system, they are given a numeric value from 0 and up (the "first" joystick is #0, the "second" is #1).
Functions
getName( joystick ) Gets the name of a joystick.
getNumJoysticks( ) Gets the number of joysticks.
getNumAxes( joystick ) Gets the number of axes on a joystick
getNumBalls( joystick ) Gets the number of trackballs on a joystick
getNumButtons( joystick ) Gets the number buttons on a joystick
getNumHats( joystick ) Gets the number viewhats on a joystick
isDown( joystick, button ) Checks if a button is down.
getAxis( joystick, axis ) Gets the state of an axis.
getAxes( joystick ) Gets the states of the axes.
getBall( joystick, ball ) Gets the relative position of a trackball.
getHat( joystick, viewhat ) Gets the state of a viewhat.
open( joystick ) Opens a joystick.
isOpen( joystick ) Checks whether a joystick is open.
close( joystick ) Closes a joystick
Copyright © 2006-2008 LÖVE Development Team.