I'm guessing by your mentioning of "the Amiga section" that you're using some kind of front end? For what it's worth, I tried setting up FS-UAE, which is a fork of the same base program that WinUAE is a fork of, so this may or may not be relevant:
To exit FS-UAE, you can use the usual hard window closing key combo of Alt+F4. My notes say to use F12, then Q, but looking at my AHK script, it sends F12, then Up, then Enter. They might both work.
You mention controls in general, so I'm not sure if it's just exiting that you have a problem with, or if it's also game controls. If you also have an issue with game controls, you can read on about my experience with them...
I was unable to find any way to remap the joystick's fire button from the default of Right-Alt and Right-Control through FS-UAE. My wild guess is that is because the developer wanted a simple as possible one-to-one mapping of physical keys to the Amiga virtual KB, and the maybe the Amiga KB didn't have a Right-Alt and Right-Control, so these unused keys are hard-coded for the joystick.
I was also unable to get AHK to work reliably for remapping the fire button (although it does work reliably for exiting). It looks like using a gamepad shouldn't be a problem, but I don't remember if I tested that or not. But I'm pretty sure keyboard remapping isn't going to happen. I would be happy to be proved wrong.