Re: Question about EVT_CHAR/EVT_KEY_DOWN handler
"'raf' via wxPython-users" <[email protected]> Wed, 12 Mar 2025 22:05:55 +1100
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 12, 2025 at 09:53:48PM +1100, raf <[email protected]> wrote: > On Tue, Mar 11, 2025 at 03:36:14PM +0000, Anders Munch <[email protected]> wrote: > > > raf wrote: > > > [various confusing key binding behaviours] > > > > Two things to look out for: > > - Call event.Skip() for the keys that you don't want to take over. > > - Put the controls on a wx.Panel, and not directly on the wx.Frame. > > > > I can't explain the strange behaviour, but these are the first things to check. > > > > regards, > > Anders > > Thanks, I'm already doing both. Actually, I see that the panel is created with: panel = Panel(self, style=0) # Disable TAB_TRAVERSAL It looks like style=0 suppressed automatic tab traversal so my code could do it, but maybe this is no longer the way to suppress default tab traversal. Because something other than my code is doing tab traversal and I don't want it to. I'll look into that. Hmm, looking at: https://wxpython.org/Phoenix/docs/html/wx.Panel.html#wx.Panel It looks like style=0 should suppress tab traversal which is the default for the style parameter. But it isn't suppressed (on mac). :-( But even if that were the problem, my event handler should still be getting other keys like Ctrl-Q, Escape, Return. So maybe it's not relevant. Very odd. cheers, raf -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/wxpython-users/Z9FqkzoS61bJ_0IN%40raf.org.