but it feels a bit like a hack. attaching a shortcut to a menu that does not really exixt.
i’ve used a few of UI toolkits and almost all of them had a simple and documented way to quit application with ESC, ctrl-w and/or ctrl-q (sometimes it was even automatically setup).
i guess that it would be a nice add to wxpython to provide an easy way to close a simple application that does not have a menu : - )
That is how the accelerator table is designed. It simply changes the shortcut into a menu event. Since the menu events usually come from the frame, not the menubar, then it doesn’t need to have a menubar to work this way. When there is a menubar then the accelerators embedded in the menu items can use the same internal functionality.