Gamepad to Keyboard is a free, open-source Windows app that maps any game controller or joystick to keyboard keys and mouse clicks. Use a gamepad to play keyboard-only games, emulators, browser and retro games, or control any Windows program with a controller.
Works with Xbox, PlayStation (DualShock 4 / DualSense), Nintendo Switch Pro and generic USB or Bluetooth controllers - no drivers, no virtual controller, it just sends real keystrokes.