Can you use a controller in a browser game?

Updated on

Yes: browsers can read a game controller through what web developers call the Gamepad API, so a browser game built for it plays with a pad. Pair the controller with your device by cable or Bluetooth first, open the game, and press a button so the page sees it. Boomer Brawl plays with a gamepad on a computer: the left stick moves and the right stick aims.

How a browser sees a controller

A web browser can detect a controller through the Gamepad API. MDN Web Docs, in its guide on Using the Gamepad API, explains that this interface lets a web page read the state of a gamepad or other game controller directly. The browser exposes the controller hardware to the website, and the game reads the controller from the browser.

MDN Web Docs also says that when a controller is already connected as the page loads, the page finds out about it when you press a button or move a stick, and that action goes to the page in front. Because of this, the game cannot see the pad until you touch it. You open the game, then press any button on the controller so the game can detect it.

MDN Web Docs gives a reason for this wait only for Firefox. The browser shows a page the controllers once you use one with the page in view, which keeps a page from using them to fingerprint you. A pad plays only in games built to read a controller. A game made for the mouse alone ignores the gamepad completely.

Connect the controller first

An operating system manages the physical connection to the controller before web browsers access it. You must connect the controller to your hardware through a wired link or wireless pairing. The controller can be paired before or after the game's page opens.

The controllerBy cableBy Bluetooth
An Xbox controllerA USB cableBluetooth, or the Xbox Wireless Adapter on Windows, as Xbox Support lists in How do I connect my Xbox controller to PC
A PlayStation DualSenseA USB-C cableHold the create button and the PS button until the light bar blinks, then pick it in the device's Bluetooth list, as PlayStation Support says in How to use DualSense wireless controllers with PC, Mac and mobile devices
Another Bluetooth controllerSome connect when plugged in with a data cablePut it in pairing mode, then pick it in the Bluetooth settings, as Apple Support says in Connect a wireless game controller to your Apple device

Apple Support says that the same steps work for most Bluetooth controllers on an iPhone, an iPad and a Mac. Pairing the controller with your operating system makes it available to your web browser. You can complete this pairing process before you launch your browser or while the game's tab is already open.

What works and what does not

The standard sticks, buttons and triggers work in a game that reads them. These primary inputs translate your physical actions into character movement and actions inside supported browser titles.

PlayStation Support says that the DualSense wireless controller's adaptive triggers and haptic feedback work only when the game supports them. In addition, PlayStation Support states that the haptics need a cable on a computer and do not work on a Mac or a phone.

When the game does not see the controller

When a browser game fails to respond to your controller presses, several practical checks can restore the connection. You can resolve most input issues by working through these steps:

  • Press a button with the game's tab in front, not another window.
  • Check that the controller shows as connected in the device's Bluetooth settings.
  • Try a cable instead of Bluetooth, and unplug other controllers.
  • Reload the page with the controller already connected, then press a button.

How Boomer Brawl uses a gamepad

On a computer Boomer Brawl plays with a gamepad. The left stick moves you and the right stick aims, and pushing the right stick to its rim attacks. The right trigger attacks too, A dashes and the left shoulder button walks.

The other buttons handle menus and match details. Select shows the scoreboard, Start pauses, and B goes back in the menus.

Everyone in an online match plays on their own device, by gamepad, keyboard or touch. The guide on how to play has every control, and four players shows a match of friends. Boomer Brawl is free in the browser with nothing to install: play a round.

Common questions

Can you use an Xbox controller in a browser game?

Yes. You can use an Xbox controller connected by cable or Bluetooth in any browser game built to read a controller.

Can you use a PlayStation controller in a browser game?

Yes. The DualSense connects by cable or Bluetooth, and a game that reads controllers takes its sticks and buttons.

Why is my controller not working in a browser game?

Usually the page has not seen it yet. Press a button with the game's tab in front, or check whether the game reads controllers at all.

Do you need extra software to use a controller in the browser?

No. The browser reads the controller itself once the device has paired with it.

Sources

Keep reading