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

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.

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

1 Like

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

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

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

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

In fact there is a temporary solution

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

add a line


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

1 Like


I tried like this:


The config.ini didn´t work for me but RETRO_CONFIG is similar.

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.

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.

With all you’ve said, I’ve made a pull request. Thank you, everyone!

1 Like

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

1 Like

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

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]

1 Like

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.

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.

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.