Retro Pie supports many popular controllers out of the box.
On first boot you will be prompted to configure a controller in Emulation Station.
Once you finish configuring your controller, multiple configuration profiles will be automagically generated for most of the systems in Retro Pie.
Some emulators will still require manual controller configuration which will be detailed on their respective system page here in the documentation.
You can also configure controls for individual systems and individual games.
For more advanced controller configuration with libretro cores (any emulator that starts with ) see the Retro Arch-Configuration page.
Note that some controllers (primarily wireless or bluetooth controllers) may require special drivers to be installed through the Retro Pie Setup Script which are detailed on their individual controller page.
On first boot this menu in Emulation Station will configure your controls for both Emulationstation and Retro Arch Emulators: Hold down any button on your keyboard or gamepad and the name will appear at the bottom and then open up into a configuration menu: Follow the onscreen instructions to configure your gamepad- if you run out of buttons just hold down a button to skip each unused button.
When you get to OK press the button you have configured as "A".
If you wish to configure more than one controller, you can do so from the start menu of emulationstation.
For more details on manual controller configurations see this page Here.
See the following diagrams for reference: Hotkeys enable you to press a combination of buttons to access functions such as saving, loading, and exiting emulators.