Note: You can use any controller, but this tutorial will only describe the steps to do it with a gamecube controller + official gamecube controller adapter. Anyway, only the first step is related with the controller. The other steps are the same for every controller.

Special thanks to Stary2001 and @KazoWAR for this awesome tool.

Requirements:
Recomended:
Steps:
1. Install the driver of the Official gamecube controller adapter in your pc (there's a lot of tutorials on the internet, so please google) and run it.
2. Configure Xpadder (It's pretty easy with a noob-proof GUI). Remember the keys you choose for each button.

Now you have to choose an option

NTR CFW (recommended - better compatibility )
3. In your 3DS install InputRedirectionNTR.cia.
4. Run NTR CFW, press X+Y and select "Enable Debugger"
5. Run the installed CIA.

Homebrew Launcher (not recommended - worse compatibility)
3. In your 3DS install InputProc.cia and put the 3ds folder in the root of your sd card In
4. Run The Homebrew Launcher and launch input_loader.
5. Press start and then x to return to the home menu


6. Now in your PC, go to the PC Client and open InputRedirection NTR.exe (InputRedirection .exe if you chose the HBL option)
7. Press F1 to set your 3DS IP address (use wireless network watcher or ftpbrony to know it) and then ESC
8. Press F2 to set the key for each button of your 3ds (you can use Xpadder to remember what keys you used for the gamecube controller). To do it, first you have to press the pre-selected key, and then press the new key for each button. Once you're ready press ESC.
9. Test the controls (also, you can press F4 to show debug information).
10. Enjoy