MDN self-hosted library · e01.org

Gamepad: mapping property

Gamepad API

Open notebook · 1 cells web-api-instance-property upstream source

Gamepad API

The mapping read-only property of the Gamepad interface returns a string indicating whether the browser has remapped the controls on the device to a known layout.

The currently supported known layouts are:

Examples

let gp = navigator.getGamepads()[0];
console.log(gp.mapping);

Specifications

Browser compatibility

See also

Using the Gamepad API