How to map certain Kega Fusion functions to a gamepad?

I'm using Kega Fusion, a Sega Mega Drive/Genesis emulator, which has specific hard-coded keyboard presses for a certain functions (e.g. Backspace = Fast Forward, F5/F8 = save/load state, etc.).

Is there any way to map these keyboard presses to a gamepad?


Solution 1:

Based on a hint in the comments, the JoyToKey program was used to remap my controller to the desired keyboard inputs.

As an added bonus, the remap also only occurs when a specified program is running (in my case, the Kega Fusion emulator), as shown below.

enter image description here