buttonValue(buttonCode) → {number}
Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for exampleanalog trigger buttons on the XBOX 360 controller.
Parameters
Name Type Description buttonCode number The buttonCode of the button to check.
Returns
number - Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0.
Source code: input/SinglePad.js (Line 520)