So let me see if I got this straight, if I want add some general hotkeys to my app I must hunt down all the windows that might get focus and ensure that the event gets forwarded to some allmighty event handler. Right?
路路路
On Mon, 19 Jan 2004 16:04:31 -0800, Robin Dunn <robin@alldunn.com> wrote:
Key events are only sent to the window that has the focus.
So let me see if I got this straight, if I want add some general hotkeys to my app I must hunt down all the windows that might get focus and ensure that the event gets forwarded to some allmighty event handler. Right?
No, for hotkeys like this you would use an accelerator table. Normally accelerators are associated with menu items, (but you can also have accelerators that are not associated with menu items) and so when an accelerator key is pressed you will get an EVT_MENU event.
路路路
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
aaaa.... I see, thanks for the tip. I'l look into that.
路路路
On Tue, 20 Jan 2004 09:58:03 -0800, Robin Dunn <robin@alldunn.com> wrote:
Peter Damoc wrote:
So let me see if I got this straight, if I want add some general hotkeys to my app I must hunt down all the windows that might get focus and ensure that the event gets forwarded to some allmighty event handler. Right?
No, for hotkeys like this you would use an accelerator table. Normally accelerators are associated with menu items, (but you can also have accelerators that are not associated with menu items) and so when an accelerator key is pressed you will get an EVT_MENU event.