Dietpi + Kodi + (Retroarca or retropie) how?

I currently have a DietPi with Kodi working perfectly, along with an Argon Case V3 with NVMe and an IR sensor. I’ve also added an IR remote, and everything works perfectly. But now I want to add emulation functionality. I’d like it so that when I press the power button in Kodi, it prompts me to exit or shut down and go to the game system, and then return to Kodi when I exit the game. That’s the only thing I’m missing to make this a proper multimedia center. Any help would be greatly appreciated. Thanks.