Input · type

GamepadFamily

What the pad in the player's hands calls a position, so a consumer can draw the right prompt.

Explained in Moving things.

type GamepadFamily = 'xbox' | 'playstation' | 'nintendo' | 'generic'
import type { GamepadFamily } from '@driftengine/core';

In depth

The engine ships no art and never will. A glyph key is an identifier a consumer maps to its own icon set or font. It exists so that several consumers do not each write the same table, and so the mapping from hardware to name lives beside the hardware knowledge rather than inside somebody's heads-up display.

Four families, and no device database. A table of individual controllers is a maintenance obligation that grows with the hardware market and rots silently — and a rotted entry shows a wrong glyph to a player while no test can see it. Four families cover the pads a browser will vouch for; everything else is generic and correct rather than guessed.

What would make this wrong: a family whose members disagree about their own lettering, which would make the family the wrong unit to key on. None of these four do.