PyGame Logo
PyGame
Documentation
||  Home  ||  Help Contents  ||
 
|| CD || Channel || Font || Joystick || Rect ||
|| Sound || Surface || pygame || cdrom || display ||
|| event || font || image || joystick || key ||
|| mixer || mouse || music || surfarray || time ||

Joystick

Thin object wrapper around the SDL joystick interface. Likely to be changed.
get_axes - query number of axis
get_axis - query axis of a joystick
get_balls - query number of balls
get_button - query state of button
get_buttons - query number of buttons
get_hat - query position of hat
get_hats - query number of hats
get_id - query id of joystick

get_axes
Joystick.get_axes() -> count
 
get_axis
Joystick.get_axis(axis) -> position
 
get_balls
Joystick.get_balls() -> count
 
get_button
Joystick.get_button(button) -> bool
 
get_buttons
Joystick.get_buttons() -> count
 
get_hat
Joystick.get_hat(pov_hat) -> state
 
get_hats
Joystick.get_hats() -> count
 
get_id
Joystick.get_id() -> id