I added those lines in the retroarch.cfg file found in /opt/retropie/configs/atari2600. As I mentioned, only the last line worked.
input_exit_emulator_btn = 5
I think it worked just because 5 is already mapped through an auto-configuration file.
I guess that's what I'm looking for -> is there some master list somewhere of the syntax for the retroarch.cfg file vs. the autoconfig files? Or is that a learn linux kind of task?
It's not Linux specific, it's just the RetroArch configuration syntax. For auto-config files, you don't need to set the playerX part, e.g. input_exit_emulator_btn is ok, but when configuring the button in retroarch.cfg file you need to specify the player #, e.g. input_player1_exit_emulator_btn.
I was just thinking that instead of using the EmulationStation menu by pressing Start, scrolling down to Quit, selecting Quit, and then scrolling down to Shutdown System, et al. that I could hot-key/map some of the buttons to do ALL of that. Not necessary - just the cat's pajamas
In EmulationStation this kind of 'hotkey'/shortcut is not available, at most you can exit emulationstation (no questions asked) with F4, but you'd need a keyboard for that.