Management class for Gamepad events

Properties

GAMEPAD_POLLER_INTERVAL_MS: number = 100

How often Gamepad polling should check for button presses

Methods

  • Internal

    Begin listening to gamepad events.

    Returns void

  • Private

    Handles a Gamepad Connection event, adding its info to the poll list

    Parameters

    • event: GamepadEvent

      The originating Event

    Returns void

  • Private

    Handles a Gamepad Disconnect event, removing it from consideration for polling

    Parameters

    • event: GamepadEvent

      The originating Event

    Returns void

  • Private

    Polls all Connected Gamepads for updates. If they have been updated, checks status of Axis and Buttons, firing off Keybinding Contexts as appropriate

    Returns void

  • Private

    Converts a Gamepad Input event into a KeyboardEvent, then fires it

    Parameters

    • gamepadId: string

      The string representation of the Gamepad Input

    • up: boolean

      True if the Input is pressed or active

    • repeat: boolean = false

      True if the Input is being held

    Returns void