← Chrome 152 reference

v152 · gamepad · web api · dev trial

Gamepad button type attribute

Limited availability

  • Chrome · developer trial 152 (desktop, Android) — behind a flag
  • Edge · not separately reported
  • Firefox · no public position recorded
  • Safari · WebKit implementation PR open

Not on the Baseline register: the attribute has no web-features entry (a webstatus.dev query returns zero matches, 2026-07-29) and no BCD key. The parent gamepad web-feature — the Gamepad API as a whole — is Baseline widely available since 2019-09-27; this attribute is a new, flag-gated addition on top of it.

A read-only type attribute on GamepadButton that classifies each button as "standard" (part of the 17-button Standard Gamepad mapping), "non-standard" (a controller-specific extension), or "trackpad" — giving applications an interoperable way to recognize buttons outside the standard set, particularly the clickable trackpad on PlayStation controllers. In developer trial in Chrome 152 on desktop and Android, behind a flag.

Developer trial — API surface may move

This feature is in developer trial in Chrome 152 on desktop and Android (the milestone=152 listing files it as “In developer trial (Behind a flag)”, verified 2026-07-29). The specification change (w3c/gamepad PR #196) is open, not merged, so the enum values and attribute semantics can still change in review. To try it:

Implementation provenance: prototyped in Chromium by CL 7760763 (merged 2026-07-24, flagged); tracked as Chromium issue 339841686.

at a glance

What it isA new read-only attribute, GamepadButton.type, returning a GamepadButtonType enum value classifying the button's role relative to the Standard Gamepad mapping — "standard", "non-standard", or "trackpad"
Milestone listingChrome 152 — In developer trial (Behind a flag), desktop and Android (listing, verified 2026-07-29; the listing is authoritative per gendn invariant #2)
Spec changew3c/gamepad PR #196 — “Add extended buttons to support trackpad (#191)”, open (created 2024-03-05); rendered diff at the PR preview. The base W3C Gamepad ED does not yet contain the attribute
Runtime featureGamepadButtonTypes — status experimental, not public (flag record); Chromium IDL gates the member with [RuntimeEnabled=GamepadButtonTypes] (gamepad_button.idl)
Other enginesWebKit: WebKit PR #65693 open (“[Gamepad] Add GamepadButton.type support”), WebKit bug 266293. Gecko: the spec PR's implementation-commitment field for Mozilla is empty — no public Gecko position recorded (2026-07-29)
Member referenceGamepadButton.type — full nine-dimension reference
WPTNo dedicated upstream tests: the wpt/gamepad directory (16 files, listed 2026-07-29) has no button-type test, and the spec PR's WPT checkbox is unticked
ChromeStatus5075054393163776 — Gamepad button type attribute (blink component Blink>GamepadAPI)
Source: chromestatus.com/feature/5075054393163776; spec PR preview; gamepad_button.idl

why it exists

The Gamepad API defines standard indices for 17 common buttons (the Standard Gamepad mapping), but controllers ship with many more inputs — trackpads, share/capture buttons, voice-assistant buttons, home buttons, squeeze buttons. Today, recognizing them means hardcoding per-controller button-index tables: a DualSense trackpad click is button 17 on that controller, with no interoperable signal. The motivating case is the clickable trackpad on PlayStation controllers (DualShock 4, DualSense): cloud-gaming services want to prompt “press the touchpad” without maintaining a controller database.

The explainer lists the use classes: cloud-gaming services showing controller-specific prompts, browser games adapting UI to controller capabilities, accessibility software describing inputs meaningfully, and any application identifying touchpad input on DualShock/DualSense devices. Explicit non-goals: exposing controller model identifiers, manufacturer information, vendor-specific button names, changing existing mapping behavior, or adding remapping functionality.

Source: ChromeStatus API record — summary and motivation; explainer — goals, non-goals, trackpad use case; spec PR preview §14.1 — additional gamepad buttons

how it works

The spec PR adds a §14.1 “Additional gamepad buttons” concept: an extended gamepad button mapping beyond the Standard Gamepad mapping, covering buttons commonly found on certain models — trackpads/touchpads, share or capture buttons, voice-assistant buttons, home buttons, squeeze buttons. The section is explicit that the list is not exhaustive and that user agents may expose different or additional buttons, so a Gamepad's buttons array is not limited to 17 entries.

Every button is then classified by the new attribute relative to that extended mapping:

GamepadButtonType values (spec PR §14.1.1, verbatim descriptions)
ValueMeaning
"standard"A button whose type is defined in the Standard Gamepad mapping (the 17 named buttons: right/left/center clusters, front buttons, stick presses)
"non-standard"A button that exists on the controller but has no corresponding standard button type — the controller-specific extensions
"trackpad"A trackpad input type — a dedicated classification because trackpads have known cross-device semantics and existing developer use cases

The classification model deliberately distinguishes "trackpad" (known cross-device semantics) from "non-standard" (controller-specific, no standardized type). The explainer frames the three values as a starting set: future classifications would require separate specification review and Working Group consensus. The full member contract — exposure, lifecycle, edge cases — is on the GamepadButton.type member page.

Source: spec PR preview §14.1, §14.1.1; explainer — classification model, future evolution

syntax

The spec PR's WebIDL — a new enum plus a new attribute on the existing GamepadButton interface:

enum GamepadButtonType {
  "non-standard",
  "standard",
  "trackpad",
};

[Exposed=Window]
interface GamepadButton {
  readonly attribute boolean pressed;
  readonly attribute boolean touched;
  readonly attribute double value;
  readonly attribute GamepadButtonType type;
};

Chromium's shipped IDL (gamepad_button.idl, fetched 2026-07-29) matches the enum and attribute exactly, annotated with the runtime gate — and its inline comments gloss the values: non-standard = “a button outside the Standard Gamepad layout with no known semantic role”, standard = “a button in the Standard Gamepad layout”, trackpad = “a clickable trackpad surface”:

[RuntimeEnabled=GamepadButtonTypes]
readonly attribute GamepadButtonType type;
Source: spec PR preview — GamepadButtonType enum and GamepadButton interface (verbatim); gamepad_button.idl (verbatim, incl. value comments)

examples

Feature detection first — the attribute is absent where unsupported, so prototype detection is clean (pattern from the explainer):

if ("type" in GamepadButton.prototype) {
  // GamepadButton.type is available
}

Finding a trackpad button across connected gamepads (adapted from the explainer's trackpad example):

const gamepad = navigator.getGamepads()[0];
for (const button of gamepad.buttons) {
  if (button.type === "trackpad") {
    console.log("Trackpad button detected");
  }
}

Splitting a controller's buttons by classification:

const standard = gamepad.buttons.filter(b => b.type === "standard");
const extras   = gamepad.buttons.filter(b => b.type === "non-standard");
// e.g. render a standard-layout diagram for `standard`,
// and an "additional controls" section for `extras`

No live showcase demo yet: the Chrome Platform Showcase feature route returned 404 at HEAD-check time (2026-07-29), so per the gendn fallback rule this page links instead of embedding. A live demo also needs real gamepad hardware — this API cannot be exercised with synthetic input.

Source: snippets adapted from the explainer — examples, compatibility; showcase availability checked directly

web platform tests

No dedicated upstream WPT coverage exists for this attribute (2026-07-29): the wpt/gamepad directory lists 16 files — permissions-policy, events, rumble, timestamp, and an idlharness-manual.html — with no button-type test, and spec PR #196 leaves its “Modified Web platform tests” checkbox unticked. The Gamepad API's reliance on physical devices means much of its WPT surface is manual-only.

Source: WPT gamepad directory listing, fetched 2026-07-29; PR #196 task list

browser compatibility

Interim table. There is no BCD entry for the type member — BCD api/GamepadButton.json records only pressed, touched, and value (fetched 2026-07-29) — and no web-features entry (a webstatus.dev query returns zero matches). Rows below are compiled from the linked primary sources, not from BCD.

Interim compatibility for GamepadButton.type (not BCD-derived)
BrowserSupportEvidence
ChromeDeveloper trial 152 (desktop, Android), behind --enable-blink-features=GamepadButtonTypesmilestone=152 listing; Intent to Prototype (DevTrial desktop 152, Android 152); flag record
EdgeNot separately reportedChromium-based; no separate position on the ChromeStatus record
FirefoxNo public position recordedThe spec PR's implementation-commitment field for Gecko is an empty bug template (2026-07-29)
Safari / WebKitImplementation in progressWebKit PR #65693 (open, “[Gamepad] Add GamepadButton.type support”); WebKit bug 266293 (“Review in progress” per the explainer)
Source: linked records above, all fetched 2026-07-29

security and privacy

Source: explainer — privacy, security, compatibility; spec PR preview §14.2, §20

specifications

DocumentStatus
w3c/gamepad PR #196 — Add extended buttons to support trackpad (rendered preview)Open (created 2024-03-05, updated 2025-07-10); the normative text for this feature while unmerged — ChromeStatus classifies it as a Working Draft under development in the Web Applications WG
W3C Gamepad (Editor's Draft)The base specification; does not yet contain GamepadButton.type (PR unmerged, 2026-07-29)
Gamepad Button Type explainer (Reynolds — Google, Cáceres — Apple, Shin — NVIDIA)Explainer; records “ChromeStatus (merged in M152)” for the Chromium prototype
w3c/gamepad issue #191 — Add trackpad button supportInitial public proposal, open
Source: repository and PR records fetched 2026-07-29

see also