By default AttractMode has keyboard keys setup for some of the controls. You said you are using a minipac that is also using keyboard keys. Are you sure that you don't have any keyboard keys duplicated in the AttractMode controls? Do you have the same issue if you run the games from EmulationStation? If you are using the "runcommand" in AttractMode, try turning it off and see if the problem still happens.
Yes, some keys are mirrored. The only ones that are are movement keys, like up,down, left, right, the accept key is the same in AM as it is start in the emulator. I've removed specific keys from use on the controller for the client like tab, and esc, but yes, those are the same in the emulator (mame menu, and cancel) as in AM like the config menu and cancel. I'm not sure why this should matter. What I'm experiencing is some kind of buggy, latent, cached key inputs as I leave games. I shouldn't have to set separate keys for every single thing in the front end as I do the emulator. Shouldn't someone be able to press up and down and go through the list of games, but also be able to press up and down in the game and have it make the character go up and down?
If it were windows, I suppose I could get around this bug by having custom scripts that launch separate WinIPAC configs for use in game, and AM front end use, but what a pain in the ass?
No, I do not experience these latent button presses on exit in ES. ES functions just as designed with no problems, but it simply doesn't have a vertical/cocktail/portrait orientation without problem. My client has a cocktail cabinet and I need this functionality. I've tried rotating the monitor in the /boot/config.txt for RetroPie, but the rotation DESTORYS performance due to how the screen is rendered.
Disabling runcommand has seemed to somewhat mitigate the issue of ghosted keys, but not entirely eliminate it.