I would recommend installing the latest retropie SD image (3.0) as floob said as it integrated hotkeys by default (for retroarch emulators)
You can also see this page on the wiki for manual retroarch configurations:
https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration
The wiki also details how to connect to ssh (basically logging into your pi over your home network) along with many other things. Its a very useful resource.