Accessing HID Devices on the Web With the WebHID API: How to play the Chrome Dino Game by Jumping With a Nintendo Joy-Con Controller in One's Pocket

François Beaufort
Google Scholar


In this demonstration, we show how special hardware like Nintendo Joy-Con controllers can be made accessible from the Web through the new WebHID API. This novel technology proposal allows developers to write Web drivers in pure JavaScript that talk to Human Interface Device (HID) devices via the HID protocol. One such example of a driver has been realized in the project Joy-Con-WebHID, which allows for fun pastimes like playing the Google Chrome browser's offline dinosaur game by jumping. This works thanks to the accelerometers built into Joy-Con controllers whose signals are read out by the driver and used to control the game character in the browser. A video of the experience is available.