Scroll down to or Sound, video and game controllers .
Here’s the direct answer:
Retro games, emulators, or PC games that only accept keyboard commands. 4. ViGEmBus (Virtual Gamepad Emulation Bus)
Here's the combo I've tested successfully on Windows 11 24H2:
Use ViGEm Bus + a small HID listener service with a configurable map. No kernel coding needed, and it works on locked-down Windows 11 systems.