I don't think I used NES emulators when I had my GPIO buttons.
You might find some more info here:
https://github.com/retropie/retropie-se ... ent-System
https://github.com/RetroPie/RetroPie-Se ... figuration
Some emulators accepted for example 'LCTRL' in their contoller configs and others you needed the Keycode number. I don't have the info infront of me, but for every keypress there is also a number (not correct but) for example 'LCTRL' = '223'.
I am pretty sure that the Adafruits Retrogame has some information in their files.
How old is your Adafruits Retrogame download? I see it has been updated recently and there is info about newer emulators needing a physical USB keyboard, but it creates a virtual keyboard:
// SDL2 (used by some newer emulators) wants /dev/input/eventX
// instead -- BUT -- this only exists if there's a physical USB
// keyboard attached or if the above code has run and created a
// virtual keyboard. On older systems this method doesn't apply,
// events can be sent to the keyfd1 virtual keyboard above...so,
// this code looks for an eventX device and (if present) will use
// that as the destination for events, else fallback on keyfd1.
// The 'X' in eventX is a unique identifier (typically a numeric
// digit or two) for each input device, dynamically assigned as
// USB input devices are plugged in or disconnected (or when the
// above code runs, creating a virtual keyboard). As it's
// dynamically assigned, we can't rely on a fixed number -- it
// will vary if there's a keyboard connected at startup.