PS4 controller test for a DualShock 4

Every index below is labelled the way Sony prints it — Cross, not buttons[0]. What matters on a pad this old is further down the page: the two ways a DualShock 4 ages that a lights-only test cannot see, both of which are measurable here.

No controller yetLabels shown for DualShock 4

Press any button on your controller

A connected pad stays invisible to this page until you use it. That is the specification working as designed, not a fault — see the note below the tool.

Device report

id
waiting for input
mapping
—
index
—
buttons
—
axes
—
vibrationActuator
—

Vibration

Buttons

  • [0] Cross ✕—
  • [1] Circle ○—
  • [2] Square □—
  • [3] Triangle △—
  • [4] L1—
  • [5] R1—
  • [6] L2—
  • [7] R2—
  • [8] Share—
  • [9] Options—
  • [10] L3—
  • [11] R3—
  • [12] D-pad ↑—
  • [13] D-pad ↓—
  • [14] D-pad ←—
  • [15] D-pad →—
  • [16] PS button—

Axes

  • [0] left stick horizontal0.000
  • [1] left stick vertical0.000
  • [2] right stick horizontal0.000
  • [3] right stick vertical0.000

The two faults that matter on a used DualShock 4

This is the oldest pad on the site and by now most of them have seen years of use, so the interesting question is not "do the buttons work" — they nearly always do — but whether the analog parts have aged. Two failures dominate, and both pass a test that only shows lights.

Sticks that no longer rest at zero. Put the pad down, take your hands off, and run the drift meter for a minute. It reports the largest resting offset each stick produced, along with the share of samples that read exactly zero — the figure that tells you whether a clean result is real or just a dead zone applied upstream. Triggers that no longer return. With your hands off, L2 and R2 must read exactly 0.000. A trigger resting at 0.02 is below the threshold that flips the pressed flag, so it looks fine everywhere except in a game that reads the analog value.

What Chromium reads each DualShock 4 button from

Transcribed from MapperDualshock4 in Chromium's gamepad_standard_mappings_win.cc. Windows only — Chromium keeps separate mapping files for macOS and Linux, which this table does not cover. Applies to: DualShock 4, the PS4 Slim revision, and the DualShock 4 USB receiver.
Canonical index Button on the pad Read from Arrives as
buttons[0] Cross ✕ buttons[1] a raw button
buttons[1] Circle ○ buttons[2] a raw button
buttons[2] Square □ buttons[0] a raw button
buttons[3] Triangle △ buttons[3] a raw button
buttons[4] L1 buttons[4] a raw button
buttons[5] R1 buttons[5] a raw button
buttons[6] L2 AxisToButton(axes[3]) an axis, converted
buttons[7] R2 AxisToButton(axes[4]) an axis, converted
buttons[8] Share buttons[8] a raw button
buttons[9] Options buttons[9] a raw button
buttons[10] L3 buttons[10] a raw button
buttons[11] R3 buttons[11] a raw button
buttons[16] PS button buttons[12] a raw button
buttons[17] beyond the Standard Gamepad buttons[13] Tagged GamepadButtonType::kTrackpad — the touchpad click, not the touch surface.

DpadFromAxis(axes[9]) fills indices 12–15 from a single hat axis.

The triggers are the row to look at. They are not read from raw buttons at all — they are converted from axes, which is why they carry a continuous value while every other entry in the array is effectively on or off. The face buttons are reordered rather than passed through, because the raw report lists them in Sony's order and the canonical layout wants them in geometric order.

The DualShock 4 and the DualSense are the same device to a browser

Put the two mapper tables side by side and every canonical button is read from the same raw source, position for position — this page checks that programmatically when the site is built, so you never have to compare by eye. At the label level the two pads differ at exactly 1 of the 17 canonical indices: buttons[8], the left button in center cluster, which Sony printed as Share on the DualShock 4 and renamed to Create on the DualSense. The other 16 indices carry identical labels.

The practical consequence is pleasant: anything you write against a DualShock 4's indices runs unchanged on a DualSense, and a binding screen built for one needs no work for the other beyond the printed name of a single button. It also means a diagnosis made here transfers — if you are comparing an old pad against a new one, you are comparing like with like. The PS5 DualSense test covers what the newer pad adds that a browser still cannot reach.

Bluetooth, USB, and the pads that are not really DualShocks

Chromium routes controllers to a mapping by product id, and it carries entries for the original DualShock 4, the PS4 Slim revision and the USB receiver. A genuine pad on any of those paths reports mapping === "standard" and behaves as this page describes. A third-party PS4-style controller very often does not: it reports the empty string, its buttons arrive in its own order, and no published index table applies — including this one. The device panel makes this a one-second check, and it is worth doing before you conclude that a button is in the wrong place.

The same caution applies to adapters. What the browser identifies is the adapter, not the controller behind it, so two adapters for the same DualShock 4 can produce two different orderings. If you use one, run the live panel once and write down what each button actually reports; that list beats any chart.

Run the list backwards

On a pad this old the usual order is the wrong order. Start with the two checks that actually fail, and only then work back to the buttons, which almost always still work.

  1. Sticks at rest first. Hands off for a minute on the drift meter, and read the zero-sample share as well as the offset.
  2. Triggers at rest second. L2 and R2 must read exactly 0.000 with nothing touching them.
  3. Then L2 and R2 under load, sweeping smoothly from 0.000 to 1.000; L1 and R1 digital.
  4. Touchpad click — index 17, in the extras row — plus L3 and R3 by clicking each stick.
  5. Share, Options and the PS button; then the d-pad, indices 12 to 15.
  6. Cross, Circle, Square, Triangle last — canonical indices 0 to 3, around the cluster.
  7. Vibration, from the device panel.

Questions people actually ask

Will a DualShock 4 work in a browser at all?

Yes, over USB and over Bluetooth, and Chromium carries dedicated mappings for the original DualShock 4, the PS4 Slim revision and the USB receiver. The device panel prints your pad's id and mapping; if mapping reads "standard" the index table applies exactly as written. Third-party PS4-style pads are the usual exception and often report an empty mapping instead.

Is a DualShock 4 mapped differently from a DualSense?

No — and you do not have to take that on trust. Chromium's Windows mappers for the two pads assign every canonical button from the same raw source, position for position. Anything you write against a DualShock 4's indices works unchanged on a DualSense.

My L2 and R2 show a value even when I am not touching them.

That means the triggers are not returning fully to rest, and it is worth catching. A trigger resting above 0.000 sits below the press threshold, so it passes any pass/fail tester while a game with a low trigger dead zone reads a permanent light pull. Take your hands off the pad entirely and read the values on the analog trigger test; both should be exactly 0.000.

Where does the touchpad click show up?

At index 17, past the end of the Standard Gamepad, which stops at 16. Chromium tags it as a trackpad-type button, set apart from the ordinary ones. Where your finger is on the surface is a separate matter: the specification defines a touch array for it, but Chromium keeps that behind an experimental runtime flag, so a browser with default settings confirms the click and says nothing about the pad's tracking.

The light bar stays on and drains the battery. Can this page turn it off?

No. The Gamepad API has no output channel for LEDs; the only output the specification defines is haptic. That is a limitation of the interface rather than of this page, and any web tool claiming to control a DualShock 4 light bar is not doing it through the Gamepad API.

How many buttons should a DualShock 4 report?

18 — the 17 canonical ones plus the touchpad click appended after them. A count of 17 means the touchpad click is not being mapped, which happens with some adapters and third-party clones. A wildly different count usually means the pad is not being remapped at all; check whether mapping is the empty string.

Keep testing

Test the rest of the desk