Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/yxz/typing/lib.dom.ts>Gamepad

Deno Standard Extensions
Latest
interface Gamepad
import { type Gamepad } from "https://deno.land/x/yxz@0.32.0/typing/lib.dom.ts";

This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id. Available only in secure contexts.

Properties

readonly
axes: ReadonlyArray<number>
readonly
buttons: ReadonlyArray<GamepadButton>
readonly
connected: boolean
readonly
hapticActuators: ReadonlyArray<GamepadHapticActuator>
readonly
id: string
readonly
index: number
readonly
mapping: GamepadMappingType
readonly
timestamp: DOMHighResTimeStamp