Speaking of custom button mapping....
I don't have a stripped down capx, sorry, but I'll try to explain what I did.
I made a button that shows up when I hit the esc key. This button can then be clicked to start the "button mapping" process.
An on screen prompt will tell you what to do.
Push (A) button,
Push (B) button,
Push (X) button,
and so on...
Using the "any button pressed" gamepad event and the "last button" expression I record the button that is pressed and store it's code in a variable for each button.
variable: buttonA
variable: buttonB
variable: buttonX
and so on...
this way you can always use the variable for the button you want and it will use the corresponding "mapped" button code.
and to go one further with it...
I then have it go through the actions to map buttons to.
"Please press the button to map for Jump"
"Please press the button to map for Run"
"Please press the button to map for Shoot"
and so on...
I had to build in a check for each action mapped, so that if you hit a button that has already been mapped to an action it will clear the previous button.
So the first part maps my buttons correctly, and the second part maps the actions to the buttons I want.
again, to go further...
I also set up other buttons on a menu that allow me to see what button is mapped for what action, as well as clickable buttons in the menu that let me map each action individually.
So each clickable button just calls the one specific event related to mapping that action.
This was all incredibly time consuming, but it's really helped me through development (cause I can change what my buttons do instantly), and I think it will be best in the long run for the end user/player, so you know that everyone will be able to play it (as long as their button presses are recognized by chrome anyways)
in the future...
Eventually I will flesh it out to be more polished. I'd like to include it as part of the options menu, and then also separate the mapping from the assigning of actions to buttons.
If I can figure some way to strip down a copy of my capx without having to redo the whole thing I'll post it here for reference. I don't have all the buttons in variables, etc, but enough to get the idea.