# Which buttons for multiplayer?

**URL:** https://forum.makecode.com/t/which-buttons-for-multiplayer/181
**Category:** Arcade
**Created:** [May 17, 2019, 9:33am UTC](https://forum.makecode.com/t/which-buttons-for-multiplayer/181 "2019-05-17T09:33:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![AlRado](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alrado/32/128_2.png) [@AlRado](https://forum.makecode.com/u/AlRado)
#### Post date: [May 17, 2019, 9:33am UTC](https://forum.makecode.com/t/which-buttons-for-multiplayer/181/1 "2019-05-17T09:33:20Z")

</div>

Hello!  
It is possible to control the third and the fourth player in multiplayer mode, but I cannot find by which keys.  
Or may be I can control them only with joysticks?

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [May 17, 2019, 4:23pm UTC](https://forum.makecode.com/t/which-buttons-for-multiplayer/181/2 "2019-05-17T16:23:15Z")

</div>

Welcome @AlRado!

If I am interpreting the files from my beta build correctly (which was built about a month ago), local multiplayer in the browser is configured to support two players on the keyboard. (I’m looking specifically at the file `built/sim.js`.) I haven’t tried using controllers with the MakeCode Arcade, so I don’t know how well joysticks work with the simulator in the browser. If you give that a try, let us know how it works for you!

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [May 17, 2019, 5:18pm UTC](https://forum.makecode.com/t/which-buttons-for-multiplayer/181/3 "2019-05-17T17:18:58Z")

</div>

Only two players are supported on keyboard (for anyone else interested, the controls can be found at [https://arcade.makecode.com/reference/controller](https://arcade.makecode.com/reference/controller)).

You can connect more players by connecting gamepads, though - I’ve used my xbox controller and a few others. Support for this is handled using the [gamepad api](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API), which should allow a decent variety of controllers.

---

<div class="post-metadata">

### Author: ![AlRado](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alrado/32/128_2.png) [@AlRado](https://forum.makecode.com/u/AlRado)
#### Post date: [May 17, 2019, 10:31pm UTC](https://forum.makecode.com/t/which-buttons-for-multiplayer/181/4 "2019-05-17T22:31:26Z")

</div>

Thanks for the answer **AlexK**!  
As soon as I connected two gamepads (Microsoft XBox360 and Logitech), they were immediately used by MakeCode Arcade to control the first and second players. But the connection of the third gamepad duplicates the control of the first player (in my case it was the SteamController).

---

<div class="post-metadata">

### Author: ![AlRado](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alrado/32/128_2.png) [@AlRado](https://forum.makecode.com/u/AlRado)
#### Post date: [May 18, 2019, 7:17am UTC](https://forum.makecode.com/t/which-buttons-for-multiplayer/181/5 "2019-05-18T07:17:49Z")

</div>

Thanks for the reply **jwunderl**!  
I did not understand how you can use the gamepad api in conjunction with MakeCode Arcade, maybe there is some example?
