melonJS
    Preparing search index...

    Function unbindGamepad

    • unbind the defined keycode

      Takes the type the binding was made with, because a button code and an axis code are both small integers from different sets and they collide: GAMEPAD.AXES.LX and GAMEPAD.BUTTONS.FACE_1 are both 0. Without it an axis could not be unbound at all, and asking for one by its code removed whatever button happened to share the number.

      Parameters

      • index: number

        Gamepad index

      • button: number
      • type: "buttons" | "axes" = "buttons"

        which table the binding is in, "buttons" by default

      Returns void

      me.input.unbindGamepad(0, me.input.GAMEPAD.BUTTONS.FACE_1);
      me.input.unbindGamepad(0, me.input.GAMEPAD.AXES.LX, "axes");