[UI/UX] Ability to remap controller buttons
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?
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.
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 Yeah I think that would work! This is backlogged till someone gets to it, but its a good option for whoever picks it up.
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
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
@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!
This will be released in v4.2!
yeah... looking forward to it 👍