@jaydt If I recall (and it has been like 4 years) advancemame/mess actually tracks keymap changes in the config file per SYSTEM[DISKIMAGE] such that you can define things however you like, per game title, provided you can:
Get a game to launch
Bring up the GUI menu to change key mapping
Number 1 is not trivial and requires you to have the system rom of course, but also appropriate syntax to launch a system+disk image. Doing it from command line is a good way to start. If I remember from the old post, I had to setup script files to get a configuration going in Emulation Station.
Anyway, assuming you have ADVMAME/MESS setup and have an apple rom launching AND you have a game going, you will need to have a keyboard handy and access the on-screen GUI menu. This can be problematic as this is full system emulation that can commandeer the keyboard. You need to send ADVMAME the MENU key (TAB?) to have it popup the GUI menu without it thinking you are sending the appleII the TAB key. Gosh, it has been a while since I did all of that.
Anyway, with the Menu onscreen, you should be able to map keys as needed and when you do so, exit and it will save these in the ADVMAME config file. You can map all of your keys as needed, or you can map a couple, then check the config file and do more manually. It probably matters what kind of interface (keyboard vs. gamepad) the X-Arcade is using. For me, it was all keyboard since I was setting mine up with an ultimarc iPAC.
None of this is simple by any stretch, though it is not hard to understand either. Just tedious.
First post in years! Been busy with other stuff for a while, so thanks for the walk down memory lane!