Sorry for the double post..
I've found what I was looking for in ~/.emulationstation/es_input.cfg

I will finish the implementation in mk_arcade to be able to use the MCP23017 too, after that I will be able to provide the source code