# Help with X and Y buttons

**URL:** https://forum.makecode.com/t/help-with-x-and-y-buttons/30055
**Category:** Help
**Tags:** game
**Created:** [August 10, 2024, 9:10pm UTC](https://forum.makecode.com/t/help-with-x-and-y-buttons/30055 "2024-08-10T21:10:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![not\_a\_lemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not_a_lemon/32/35289_2.png) [@not\_a\_lemon](https://forum.makecode.com/u/not_a_lemon)
#### Post date: [August 10, 2024, 9:10pm UTC](https://forum.makecode.com/t/help-with-x-and-y-buttons/30055/1 "2024-08-10T21:10:12Z")

</div>

I’m trying to make an X and Y button on a shoe box controller by using P2 A and B buttons, but it currently uses 2 USB encoders. Is there a way to set P2 A and B to the K3 and K4 positions on the same encoder the P1 buttons are plugged into?

---

<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: [August 10, 2024, 9:11pm UTC](https://forum.makecode.com/t/help-with-x-and-y-buttons/30055/2 "2024-08-10T21:11:41Z")

</div>

You might be better off using a keyboard encoder instead and mapping the additional buttons to the appropriate keyboard keys.

---

<div class="post-metadata">

### Author: ![Mega0star01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mega0star01/32/14784_2.png) [@Mega0star01](https://forum.makecode.com/u/Mega0star01)
#### Post date: [August 12, 2024, 1:58am UTC](https://forum.makecode.com/t/help-with-x-and-y-buttons/30055/3 "2024-08-12T01:58:31Z")

</div>

keyboard encoder? what’s that?

---

<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: [August 12, 2024, 2:21am UTC](https://forum.makecode.com/t/help-with-x-and-y-buttons/30055/4 "2024-08-12T02:21:24Z")

</div>

I won’t link to a specific product, but hop on your favorite shopping site or search engine and look for “arcade usb keyboard encoder.” You also can take a look at the following page in the MakeCode Arcade docs for a sample build with arcade controls.

> **[MakeCode Arcade Shoebox Controller](https://arcade.makecode.com/hardware/shoebox-controller)**
>
> Want to create your very own DIY Arcade Video Game experience with fun joysticks and buttons? It’s easier than you think! Follow these instructions to use a shoebox as your controller for Arcade games that you play on a computer. Note that these...

Basically, there are two types of encoders to which you can connect arcade controls. One kind of encoder imitates a game controller. These controllers are more frequently used in modern builds, since most modern software expects players to use game controllers.

Another, older type of encoder instead mimics a keyboard. So, when you connect an arcade joystick to a keyboard encoder, moving the joystick to the left could simulate pressing the **A** key on a keyboard. Add a second joystick, and moving the second joystick to the left could map to the **J** key.
