Extends the browser Gamepad interface to include an emulation property that exposes how this gamepad is being emulated (or not) This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id. Normally Available only in secure webpage contexts.

interface EGamepad {
    axes: readonly number[];
    buttons: readonly GamepadButton[];
    connected: boolean;
    displayId: string;
    emulation: undefined | gamepadEmulationState;
    hapticActuators?: GamepadHapticActuator[];
    id: string;
    index: number;
    mapping: GamepadMappingType;
    timestamp: number;
    vibrationActuator?: GamepadHapticActuator;
}

Hierarchy

  • Omit<Gamepad, "vibrationActuator">
    • EGamepad

Properties

axes: readonly number[]
buttons: readonly GamepadButton[]
connected: boolean
displayId: string
emulation: undefined | gamepadEmulationState
hapticActuators?: GamepadHapticActuator[]
id: string
index: number
mapping: GamepadMappingType
timestamp: number
vibrationActuator?: GamepadHapticActuator