# How to change in MGBA from X and Y button to L and R button of Gameboy Advance?

**URL:** <https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010>\
**Category:** Emulators\
**Tags:** retroarch, mgba\
**Created:** [July 29, 2018, 3:29pm UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010 "2018-07-29T15:29:48Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanrax](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tanrax](https://forum.clockworkpi.com/u/tanrax)\
**Post date:** [July 29, 2018, 3:29pm UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/1 "2018-07-29T15:29:49Z")

</div>

I’m trying to change the X and Y buttons in MGBA to the L and R buttons in Gameboy Advance. Because at the moment the X and Y keys do the same as A and B but repeatedly. I tried to change the RetroArch configuration file but it ignores me.

Thanks for all your help.

---

<div class="post-metadata">

**Author:** ![Drjekill77](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/drjekill77/32/41_2.png) [@Drjekill77](https://forum.clockworkpi.com/u/Drjekill77)\
**Post date:** [July 30, 2018, 6:50am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/2 "2018-07-30T06:50:24Z")

</div>

I was telling me the same question !  
If anyone had a clue, that could be greate.

---

<div class="post-metadata">

**Author:** ![Petrakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/petrakis/32/256_2.png) [@Petrakis](https://forum.clockworkpi.com/u/Petrakis)\
**Post date:** [July 30, 2018, 7:12am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/3 "2018-07-30T07:12:47Z")

</div>

Go to retroarch, load mgba core, then go to input.

Next user 1 bindings and change it there, it worked for me.

---

<div class="post-metadata">

**Author:** ![Drjekill77](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/drjekill77/32/41_2.png) [@Drjekill77](https://forum.clockworkpi.com/u/Drjekill77)\
**Post date:** [July 30, 2018, 7:59am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/4 "2018-07-30T07:59:10Z")

</div>

Ok, you can change the input just for one emulator and not for all of them. That s greate.  
I m a beaginner in retroarch

Thanks for the informations

---

<div class="post-metadata">

**Author:** ![tanrax](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tanrax](https://forum.clockworkpi.com/u/tanrax)\
**Post date:** [July 30, 2018, 9:08am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/5 "2018-07-30T09:08:24Z")

</div>

> [@Petrakis](#):
>
> retroarch

Gracias por la respuesta!  
Lo ideal sería sin cargar retroarch, en el launcher. For a time-saving reason. 😛

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [July 30, 2018, 9:34am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/6 "2018-07-30T09:34:13Z")

</div>

In fact there is a temporary solution

in ~/apps/launcher/Menu/GameShell/20\_Retro\ Games/MGBA/action.config

add a line

> RETRO\_CONFIG=/where/ever/retroarch.cfg

then retroarch will use this retroarch.cfg instead of global one : ~/.config/retroarch/retroarch.cfg

you can define whatever you want in the custom retroarch.cfg and wont effect others

---

<div class="post-metadata">

**Author:** ![Petrakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/petrakis/32/256_2.png) [@Petrakis](https://forum.clockworkpi.com/u/Petrakis)\
**Post date:** [July 30, 2018, 9:49am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/7 "2018-07-30T09:49:23Z")

</div>

Nice!  
 ![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/1X/dd01ffe63ee3d231c060ca12a7d9b9ff2635494b.png)

I tried like this:

> [input.SDLK]  
> keyL=[SDLK\_u]  
> keyR=[SDLK\_i]  
> keyStart=[SDLK\_RETURN2]  
> keyDown=[SDLK\_DOWN]  
> keyLeft=[SDLK\_LEFT]  
> keyB=[SDLK\_k]  
> keyUp=[SDLK\_UP]  
> keyA=[SDLK\_j]  
> keyRight=[SDLK\_RIGHT]  
> keySelect=[SDLK\_SPACE]

The config.ini didn´t work for me but RETRO\_CONFIG is similar.

---

<div class="post-metadata">

**Author:** ![DisruptItYourself](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/disruptityourself/32/359_2.png) [@DisruptItYourself](https://forum.clockworkpi.com/u/DisruptItYourself)\
**Post date:** [July 30, 2018, 4:45pm UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/8 "2018-07-30T16:45:37Z")

</div>

RetroArch has support for this via remaps but we can’t seem to create them with this version of retroarch. You can create the blank file via controls\>Save Core Remap File which creates a folder in CPI\>.CONFIG\>RETROARCH\>REMAPS\> based on the name of your core (mGBA in this case)

The file is called mGBA.rmp but it will be an empty file and I don’t know what the format is. This should be the ideal way to do this if we can figure it out.

---

<div class="post-metadata">

**Author:** ![DisruptItYourself](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/disruptityourself/32/359_2.png) [@DisruptItYourself](https://forum.clockworkpi.com/u/DisruptItYourself)\
**Post date:** [July 30, 2018, 5:41pm UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/9 "2018-07-30T17:41:06Z")

</div>

This is my mGBA.rmp

`input_player1_b = "j" input_player1_b_btn = "nul" input_player1_b_axis = "nul" input_player1_b_mbtn = "nul" input_player1_y = "h" input_player1_y_btn = "nul" input_player1_y_axis = "nul" input_player1_y_mbtn = "nul" input_player1_select = "space" input_player1_select_btn = "nul" input_player1_select_axis = "nul" input_player1_select_mbtn = "nul" input_player1_start = "enter" input_player1_start_btn = "nul" input_player1_start_axis = "nul" input_player1_start_mbtn = "nul" input_player1_up = "up" input_player1_up_btn = "nul" input_player1_up_axis = "nul" input_player1_up_mbtn = "nul" input_player1_down = "down" input_player1_down_btn = "nul" input_player1_down_axis = "nul" input_player1_down_mbtn = "nul" input_player1_left = "left" input_player1_left_btn = "nul" input_player1_left_axis = "nul" input_player1_left_mbtn = "nul" input_player1_right = "right" input_player1_right_btn = "nul" input_player1_right_axis = "nul" input_player1_right_mbtn = "nul" input_player1_a = "k" input_player1_a_btn = "nul" input_player1_a_axis = "nul" input_player1_a_mbtn = "nul" input_player1_x = "l" input_player1_x_btn = "nul" input_player1_x_axis = "nul" input_player1_x_mbtn = "nul" input_player1_l = "nul" input_player1_l_btn = "nul" input_player1_l_axis = "nul" input_player1_l_mbtn = "nul" input_player1_r = "nul" input_player1_r_btn = "nul" input_player1_r_axis = "nul" input_player1_r_mbtn = "nul" input_player1_l2 = "y" input_player1_l2_btn = "nul" input_player1_l2_axis = "nul" input_player1_l2_mbtn = "nul" input_player1_r2 = "o" input_player1_r2_btn = "nul" input_player1_r2_axis = "nul" input_player1_r2_mbtn = "nul" input_player1_l3 = "nul" input_player1_l3_btn = "nul" input_player1_l3_axis = "nul" input_player1_l3_mbtn = "nul" input_player1_r3 = "nul" input_player1_r3_btn = "nul" input_player1_r3_axis = "nul" input_player1_r3_mbtn = "nul" input_player1_l_x_plus = "nul" input_player1_l_x_plus_btn = "nul" input_player1_l_x_plus_axis = "nul" input_player1_l_x_plus_mbtn = "nul" input_player1_l_x_minus = "nul" input_player1_l_x_minus_btn = "nul" input_player1_l_x_minus_axis = "nul" input_player1_l_x_minus_mbtn = "nul" input_player1_l_y_plus = "nul" input_player1_l_y_plus_btn = "nul" input_player1_l_y_plus_axis = "nul" input_player1_l_y_plus_mbtn = "nul" input_player1_l_y_minus = "nul" input_player1_l_y_minus_btn = "nul" input_player1_l_y_minus_axis = "nul" input_player1_l_y_minus_mbtn = "nul" input_player1_r_x_plus = "nul" input_player1_r_x_plus_btn = "nul" input_player1_r_x_plus_axis = "nul" input_player1_r_x_plus_mbtn = "nul" input_player1_r_x_minus = "nul" input_player1_r_x_minus_btn = "nul" input_player1_r_x_minus_axis = "nul" input_player1_r_x_minus_mbtn = "nul" input_player1_r_y_plus = "nul" input_player1_r_y_plus_btn = "nul" input_player1_r_y_plus_axis = "nul" input_player1_r_y_plus_mbtn = "nul" input_player1_r_y_minus = "nul" input_player1_r_y_minus_btn = "nul" input_player1_r_y_minus_axis = "nul" input_player1_r_y_minus_mbtn = "nul"`

Didn’t work. With this loaded no buttons are responsive and b seems to kind of restart the rom. Perplexing.

---

<div class="post-metadata">

**Author:** ![tanrax](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@tanrax](https://forum.clockworkpi.com/u/tanrax)\
**Post date:** [July 30, 2018, 6:30pm UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/10 "2018-07-30T18:30:55Z")

</div>

With all you’ve said, I’ve made a pull request. Thank you, everyone!  
[https://github.com/clockworkpi/launcher/pull/75](https://github.com/clockworkpi/launcher/pull/75)

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [July 31, 2018, 3:24am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/11 "2018-07-31T03:24:14Z")

</div>

The launcher will auto detect if there is a file called retroarch-local.cfg under 20\_Retro\ Games/[MGBA,MAME,etc] Now

and use it as RETRO\_CONFIG

---

<div class="post-metadata">

**Author:** ![ChandBong](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@ChandBong](https://forum.clockworkpi.com/u/ChandBong)\
**Post date:** [July 31, 2018, 9:42pm UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/12 "2018-07-31T21:42:26Z")

</div>

Yes, this works indeed. Thank you. However, what do I have to change in RETRO\_CONFIG such that I get the wanted result?

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [August 1, 2018, 4:43am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/13 "2018-08-01T04:43:10Z")

</div>

maybe you dont need to change RETRO\_CONFIG  
just put a retroarch-local.cfg in ~apps/launcher/Menu/GameShell/20\_Retro\ Games/[MGBA,MAME,etc]

---

<div class="post-metadata">

**Author:** ![Brian\_Gordon](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/brian_gordon/32/4033_2.png) [@Brian\_Gordon](https://forum.clockworkpi.com/u/Brian_Gordon)\
**Post date:** [March 24, 2020, 6:13am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/14 "2020-03-24T06:13:40Z")

</div>

Just in case anyone else is confused, all you have to do is **load up a game and press Shift+Menu** to bring up the retroarch menu. You can remap controls there. This may not be necessary but I also selected “save core remap” and my remapped controls carry over between games.

Note that if you’re using the SNES-style button layout you need to reverse your bindings for the X and Y buttons.

---

<div class="post-metadata">

**Author:** ![javelinface](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/javelinface/32/3079_2.png) [@javelinface](https://forum.clockworkpi.com/u/javelinface)\
**Post date:** [March 24, 2020, 6:21am UTC](https://forum.clockworkpi.com/t/how-to-change-in-mgba-from-x-and-y-button-to-l-and-r-button-of-gameboy-advance/1010/15 "2020-03-24T06:21:57Z")

</div>

Hey, just thought I’d clarify, in case people get confused.

This is a SUPER old thread from two years ago; with the last post made in August 2018, when the retroarch build and Clockwork OS didn’t have everything configured to allow keys to be detected. Back in those days, you couldn’t easily reconfigure keys, as trying to do so just resulted in a time out, and no new input detected. You had to manually edit the retroarch.config file.

These days, it is all working since upgrading to Clockwork OS 0.5 and Retroarch 1.8.x. See this post I made a while back.

> [@Retroarch cant bind inputs](https://forum.clockworkpi.com/t/retroarch-cant-bind-inputs/2921/8):
>
> Re: retroarch keybind input problems/timeouts. I decided to look into it. Since the Gameshell treats the joystick as a keyboard, it would make sense to use an appropriate driver. By default, the input driver that is selected is “X”, which I am assuming is X input. This is an appropriate input for a joystick, however given the nature of the arduino keyboard, this is not suitable. Being the most recent and feature packed driver, featuring keyboard callback, mouse and touchpad compatibility, I …

Re: snes bindings, they’re going by the physical locations of the key, ie, X = North, Y = West, A = East, B = South. You can physically attach the keys to whatever you want. Dependent on the display, you may or may not need to change the configuration. In fact, ergonomically, it should be set to be the correct binding, unless you have flashed the firmware of the arduino keyboard to have SNES bindings; in which case you will have to change it. Most people would simply change it via the settings menu.
