If you’re trying to set up DOS games like Jetpack in something like RetroPie or Batocera, you might run into a problem where pressing the S key (“start new game” in Jetpack) doesn’t do anything, whether through a physical keyboard or through padtokey mappings.
This is most likely because RetroArch’s default hotkeys map S to one of the buttons on the virtual gamepad. (A decision which makes sense for consoles, where you need a gamepad and a keyboard is optional at best, but makes no sense for retro computers, where a keyboard is standard or even built-in, and a joystick is optional)
While I don’t know about RetroPie, under Batocera, the simplest solution is to add the following lines to your
/userdata/system/batocera.conf to disable those mappings:
Then, if you do need mappings for DOS games, they probably go the other way (making the gamepad fake keypresses) and can be handled via padtokey mappings.