Developer WerWolv98 has released a homebrew tool for Nintendo Switch that allows you to use the console as a controller for the Windows operating system.

How to use?
  • Download the latest ScpDriverInterface release and use the ScpDriverInstaller.exe in there to install the Scp drivers.
  • Download the latest SwitchXBOXController release and execute SwitchXBOXController_Server.exe. You might have to allow network access in the firewall settings.
  • Put the SwitchXBOXController_Client.nro in your /switch folder on the SD Card of your Nintendo Switch.
  • Start the homebrew application using the hbmenu

Source: Github/WerWolv98