I don’t want to hijack the thread but i do have the same issue, all other emulators seem to work OK (including mame-libretro) but mame (mame4all) doesn’t.
I notice in the emulationstation es_systems.cfg file that mame4all gets started without specifying the retroarch.cfg file.
In the same file mame-libretro is started with the retroarch.cfg and my pad works as expected but i have other issues with mame-libretro so would like to use mame4all.
I’ve tried using the keyboard, TAB, ESC etc but nothing works, i started the mame4all emulator from cli without loading a rom and controls don’t work on the front-end menu and neither does the keyboard.
PS. Oh and thanks for this amazing setup-script I’ve had so much fun these past few days.