if you are having issues with retropi and controllers not working, cant exit the emulator or cant use hot keys. Here is some links that might help with this data.
Also a cool tip if you break or make a mess of your retropi.cfg files here is a nice tip run these commands from shell and they will rebuild the config files.
sudo ~/RetroPie-Setup/retropie_packages.sh retroarch configure
sudo ~/RetroPie-Setup/retropie_packages.sh lr-fceumm configure