Gamepad constants


Jump to: navigation, search
Game pad constants as they are mapped on an Xbox 360 controller.

This article is an overview of gamepad related constants, the following is a description of the mapping of control constants.

Constant Description
gp_face1 Top button 1 ("A" on the Xbox 360 controller; cross on the PS3 controller)
gp_face2 Top button 2 ("B" on the Xbox 360 controller; circle on the PS3 controller)
gp_face3 Top button 3 ("X" on the Xbox 360 controller; square on the PS3 controller)
gp_face4 Top button 4 ("Y" on the Xbox 360 controller; triangle on the PS3 controller)
gp_shoulderl Left shoulder button (digital)
gp_shoulderr Right shoulder button (digital)
gp_shoulderlb Left shoulder trigger (analogue)
gp_shoulderrb Right shoulder trigger (analogue)
gp_select The select button on PlayStation 3 and the back button on Xbox 360
gp_start The start button
gp_stickl The left stick pressed (as a button)
gp_stickr The right stick pressed (as a button)
gp_padu D-pad up (digital)
gp_padd D-pad down (digital)
gp_padl D-pad left (digital)
gp_padr D-pad right (digital)
gp_axislh Left stick horizontal axis (analogue)
gp_axislv Left stick vertical axis (analogue)
gp_axisrh Right stick horizontal axis (analogue)
gp_axisrv Right stick vertical axis (analogue)

The following are gamepad constants regarding battery life.

Constant Description
gp_empty The charge is completely empty
gp_low The charge is low and the controller should be plugged in soon
gp_medium The battery has a medium charge
gp_full The battery is fully charged

The following are gamepad constants regarding battery type.

Constant Description
gp_disconnected The battery is disconnected from the controller
gp_wired The controller is wired into the Xbox, so it does not have a "battery"
gp_alkaline The battery is alkaline
gp_nimh The battery is nickel metal hydride.
gp_unknown The battery type can not be determined
Personal tools