Gamepad API Content Kit

Playing around with the Gamepad API

Welcome to the Gamepad API Content Kit where you can find all the resources you will ever need about the Gamepad API. You can use it to learn the topic yourself or teach it to others either by giving a conference talk or running a hands-on workshop.

Fork me on GitHub

Content Kit materials

This Content Kit can be used as a base for the conference talk material, workshop, online training or whatever else comes to your mind. You can use the slides containing the commented, explained snippets of code to present the topic to the audience, or you can run a live-coding session showing people how to build a demo that supports use of gamepad from scratch. You can also add your own content or trim the existing one if you have limited time for the talk.

Current version and licensing

This Content Kit was last updated on September 8th 2015. It is published under the Mozilla Public License, version 2.0.

Prerequisites for the presenter

Prerequisites for the audience

Key points

Here's what the audience will be able to do or get from your talk:

Presentation setup

To present about the Gamepad API all you need is the browser that supports it.

Besides the slide deck alone, you can also show the test demo detecting the gamepad, or even launch a game like Hungry Fridge to show the gamepad in action. Bonus points for using the gamepad as the slide "clicker" to change them. Giving the presentation with the test demo and a little showcase of the full game should take about 25-30 minutes.

Demo setup

In its simplest form, the demo can be run simply by double clicking the html file from the demo subpage, or navigating to the live demo directly.

As with the rest of the materials you will need a browser that supports the Gamepad API and a decent device to use it. You can show the audience that the relevant buttons you are pressing on the gamepad are shown on the image of the device on the screen. You can explain the full source code of the demo if you have extra time.


Follow these external reference materials to learn more about the Gamepad API.

Docs and status

Articles and tutorials

Demos and tests

Books and games

Technical difficulties

You may encounter some technical difficulties during your time with the gamepad. If the API is not working properly you will need to reconnect the gamepad, restart the browser or in some cases even the computer. Try to use only one browser at a time as the second one may take over and hold the connection with the device.

Sometimes you will need hardware drivers if your system do not have them for the gamepad you're connecting by default. Remember about the devices having different button layouts, try this test and see what the browser is detecting. The Gamepad API is still a work in progress and may change in the future, treat it as an unstable demo and everything will be fine.

Frequently Asked Questions (FAQs)

Remember that the audience may have some questions about the topic. Be sure to feel comfortable with what you're presenting. Don't worry if you don't know the answer to a question - you can always tell them you'll check it and answer later, or you can point them to any of the external resources so they can check it themselves.

What is the current status of the documentation?
It's Working Draft, so still work in progress.
What browsers currently supports the API?
Firefox, Chrome, Opera and Edge.
What devices works best with the API?
XBox 360, XBox One, PS3, PS4.


Send pull requests if you find anything that should be fixed or updated.


The English version is the only one available right now, but the Polish version is being worked on and should be available in the near future. Feel free to translate the resources to your native language and send the pull request, so other developers can benefit from that.

About the author

This Content Kit was created by Andrzej Mazur - you can ping him on Twitter @end3r or send him an email. Feel free to ask questions, request training on using the Content Kit or preparing for the talk. Send feedback if you have any.

More about Content Kits

If you're interested in Content Kits you can find the full list on the MDN page. If you want to create one yourself there's Mozilla Wiki for that with all the details you need. The Content Kits project started as the collaboration between the Mozilla MDN Technical Writers and Technical Evangelism teams. They are here to help you, so don't hesitate if you need anything or have any questions: ask them directly via the #mdn IRC channel or the dev-mdc mailing list.