[EDITED ANSWER]
(there already several solutions)
You can use your ps3 controller to use with both kodi ans retrosmc.
- For kodi17 just follow the instructions in kodi 17 itself when choosing ps3 controller.
settings, systems, input, peripherals, configure attached controllers, get more …,playstation controller,[select it and configure] - For retrosmc, you can use a guide I’ve made some months ago:
Look into this link:
[url][HowTo] RetroPie and OSMC: Retrosmc - Retrogaming on OSMC - #968 by nvdias
Good luck.
(and post back your results)