Look up the controller's layout here:
https://github.com/kodi-game/controller-...ter/addons
For example, see layout.xml for game.controller.snes which ships with kodi:
https://github.com/kodi-game/controller-...layout.xml
If
game.controller.snes is the second argument, then all the "name" parameters (a, b, x, y, start, select, up, right, down, left, leftbumper, rightbumper) can be used as the first argument. If a name parameters other than those is present, you'll get an empty string.
EDIT:
If a controller doesn't have the button then the button shown in the GUI can't be used.
For example, physical SNES controllers can't change the volume using the right stick.
To solve this, I plan to add the ability to specify different controllers in
joystick.xml. But then the button shown in the UI will no longer be correct.
Some day, if I get to it, then we'll look up the combo in joystick.xml. I want the combo shown in the UI to be the buttons mapped to the action for the last controller to send a button press. For example, if you have a SNES and 360 controller connected, pressing a 360 controller button will update the label to "Back + X", pressing a snes button will update the label to "Select + Y".
However, making the label dynamic is tricky because the string is only processed once. I'll have to introduce a new "label"-like control that can update dynamically based on user input, and that's a much larger task for a later version.