Use your 3DS as a controller for Windows.
Latest version can be found here. You also need to install vJoy and configure one or more vJoy devices with 8 buttons and one continous POV Hat Switch.
Copy the 3ds folder to the root of your SD card and run the homebrew from homebrew channel. Start broadcasting and the 3DS will connect after up to 10 seconds. Note that the screen goes black, to save battery, when the 3DS is connected.