http://bugs.winehq.org/show_bug.cgi?id=10643
--- Comment #5 from markk@clara.co.uk 2008-09-03 12:30:40 --- The bug is probably related to Wine's DirectInput implementation. The problem seems to be that when F12 is pressed the WinUAE main window is active. WinUAE then opens its settings window, which makes the main window inactive whilst F12 is still pressed down.
Upon closing the settings window, WinUAE (or Wine DirectInput?) still sees F12 as being pressed down, presumably because the main window never received the key-up event. So WinUAE opens its settings window again.
I have found a workaround to at least allow WinUAE to be used under Wine. Before dismissing the settings window, click in the main window to activate it, then press and release F12. You can then dismiss the settings window and it will not reappear.