ashr12/ps5-controller-webhid — explained in plain English
Analysis updated 2026-05-18
Read DualSense controller buttons, sticks, and motion sensors directly in a web game.
Trigger rumble vibration and adaptive trigger resistance from browser JavaScript.
Add PS5 controller support to a React app using the included hook.
Test whether a specific DualSense controller and browser combination works correctly.
| ashr12/ps5-controller-webhid | 0xradioac7iv/tempfs | 7vignesh/pgpulse | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a secure browser context (localhost or HTTPS) and a Chromium based browser that supports WebHID.
ps5-controller-webhid is a JavaScript and TypeScript library that lets web browsers read input from a PS5 DualSense controller directly, without any plugin or native app. It uses a browser technology called WebHID to talk to the controller and gives you clean, named access to buttons, joysticks, triggers, motion sensors, touch pad contacts, and battery level, instead of making you decode raw hardware data yourself. It can also send output back to the controller, such as rumble vibration and the adaptive trigger resistance the DualSense is known for. You install it as an npm package and connect a controller with a few lines of code, then either subscribe to a stream of input updates or read the current state yourself inside a game loop. It also ships with a matching React hook for projects built with React, kept as an optional add on so non React projects are not forced to include it. Alongside the library, the repository includes a small tester web app that connects a controller and checks that buttons, motion, and haptic feedback are all working, producing a local report of the results. The controller can connect over USB or Bluetooth, including step by step Bluetooth pairing instructions for macOS. All controller data stays inside the browser, the project has no backend server, analytics, or tracking of any kind. It currently supports the standard DualSense controller in Chrome and Edge on desktop, with other controllers and browsers like Safari and Firefox not yet supported. This is aimed at web developers building browser based games or interactive experiences who want proper DualSense controller support. It builds on an existing library called dualsense-ts and is released under the MIT license, though it is an independent project not affiliated with Sony.
A TypeScript library that lets web browsers read and control PS5 DualSense controllers over WebHID.
Mainly TypeScript. The stack also includes TypeScript, WebHID, React.
MIT license: free to use, modify, and share, including commercially, as long as the copyright notice stays attached.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.