Nice, glad it helped! For mame4all you need to set keys by launching a game and then hitting TAB on the keyboard. That will bring up the Mame menu and you can set keys from there. Whatever keys you set will be remembered going forward.
Never been a fan of ES-scraper. It’s always seemed like way more trouble then it’s worth, especially if you have a bunch of unlicensed or import games. It ends up guessing the wrong game and setting incorrect titles and images as a result. It’s also painfully slow to run on a large ROM collection.