The keyboard seems to work in the games though.
Closest I’ve got before was following the emulationstation adjustments section of this link https://github.com/retropie/RetroPie-Setup/wiki/Advanced-Configuration
when I ran /home/pi/.emulationstation/es_input.cfg I got the following screen which lists both an Xbox Gamepad and Microsoft Xbox 360 pad.
Previously I tried copying the script in the tutorial above but I only managed to get one or two buttons working.
Frying my brain this is.