Gamepad index
Button/Axis definition
button or axis code id (See input.GAMEPAD)
value indicating when the axis should trigger the keycode (e.g. -0.5 or 0.5)
"buttons" or "axes"
(See input.KEY)
// enable the keyboard
me.input.bindKey(me.input.KEY.X, "shoot");
...
// map the lower face button on the first gamepad to the X key
me.input.bindGamepad(0, {type:"buttons", code: me.input.GAMEPAD.BUTTONS.FACE_1}, me.input.KEY.X);
// map the left axis value on the first gamepad to the LEFT key
me.input.bindGamepad(0, {type:"axes", code: me.input.GAMEPAD.AXES.LX, threshold: -0.5}, me.input.KEY.LEFT);
Associate a gamepad event to a keycode