Custom Key overlay

Hi, Apologies if this has been asked before, I didn’t find an answer.

Can I create a custom keyboard map to my controller and custom on-screen buttons I create myself? For example down the left and right screen edge of my Android mobile?

I’ve been playing Frontier Elite 2 using Magic Dosbox on android, but the dos version is just not as good as the Amiga one. I would like to do the same using Retroarch with Amiga emulation. My issue is the keys. On magic dosbox, the custom key overlay options are amazing. I can bind controls to my game controller, then add additional keyboard controls to buttons on screen in positions I define. So in FE2 for example, I can bind all the F keys to the spaceship keys on screen, as well as add extra buttons around the edge of the screen with custom graphics.

Is it possible to create custom buttons like this in RetroArch? Even with an ini or XML file?

Thanks in advance, Al