romm icon indicating copy to clipboard operation
romm copied to clipboard

[UI/UX] Ability to remap controller buttons

Open wonx opened this issue 1 year ago • 6 comments

Hi,

I love that RomM embeds emulatorjs to play games in the browser. However, I noticed that the default controller mapping switches A and B, and Y and X in my gamepad (a 8BitDo Pro 2). I can reconfigure it in the "Control settings" section when the game is running, but I believe these changes only reside in the browser window and only for that specific system.

I'd like a way to be able to permanently remap controller buttons. I found this in emulatorjs documentation https://emulatorjs.org/docs4devs/control-mapping , but I don't even know where to start making those changes.

Is this currently possible?

wonx avatar Oct 20 '24 23:10 wonx

Edit: There is a hacky way to do it, which would be to open the browser console and set window.EJS_defaultControls property before launching emulatorjs. Though you'd need to do that every time you want to play, or use a tampermonkey script to set it. Not recommended.

Not currently possible. We'd need to add something in the config UI so users can set controller mappings, which is a bit tricky. Going to backlog this if someone wants to work on it.

gantoine avatar Nov 15 '24 15:11 gantoine

Would it be easier to start with having the mappings per device in a config file? At least it would work until a UI could be implemented.

Gibbz avatar Nov 29 '24 11:11 Gibbz

@Gibbz Yeah I think that would work! This is backlogged till someone gets to it, but its a good option for whoever picks it up.

gantoine avatar Nov 29 '24 15:11 gantoine

I would like to work on this feature, if nobody else is working on it. I have a german keyboard and playing with swapped y and z is kinda awkward :D

deluxe2 avatar Jun 18 '25 16:06 deluxe2

I would like to work on this feature, if nobody else is working on it. I have a german keyboard and playing with swapped y and z is kinda awkward :D

Of course bud! go for it, nobody is working on this atm

zurdi15 avatar Jun 18 '25 16:06 zurdi15

@deluxe2 whatever you end up building a) i don't think it needs to save on the server (ie client side only/localstorage is fine) and b) each user should be able to set their own values for remapping. and ideally whatever you build could be extended to pass more options to emulatorjs!

gantoine avatar Jun 18 '25 18:06 gantoine

This will be released in v4.2!

gantoine avatar Sep 07 '25 14:09 gantoine

yeah... looking forward to it 👍

Kamikaze01git avatar Sep 15 '25 18:09 Kamikaze01git