gameplate - v2.2.0
    Preparing search index...

    Interface GamepadState

    Frame snapshot of a single gamepad slot. Read-only by contract.

    interface GamepadState {
        index: number;
        id: string;
        connected: boolean;
        buttons: readonly { pressed: boolean; value: number }[];
        axes: readonly number[];
    }
    Index

    Properties

    index: number

    Slot index (0..N). Matches navigator.getGamepads()[i].

    id: string

    Platform-reported id (e.g. "Xbox Wireless Controller (STANDARD GAMEPAD)").

    connected: boolean

    true when a real gamepad is reporting on this slot.

    buttons: readonly { pressed: boolean; value: number }[]

    Button states: pressed is the boolean read; value is the analog 0..1 read.

    axes: readonly number[]

    Raw axis values, −1..1, in slot order. Deadzone is not applied here.