wxDialog uses EVT_CHAR_HOOK to catch the event. Here is the event handler
(in C++), you could probably do something similar:
void wxDialog::OnCharHook(wxKeyEvent& event)
if (event.m_keyCode == WXK_ESCAPE)
// Behaviour changed in 2.0: we'll send a Cancel message
// to the dialog instead of Close.
cancelEvent.SetEventObject( this );
// We didn't process this event.
----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Thursday, August 19, 1999 6:54 AM
Subject: [wxPython] wxPanel, wxEVT_CHAR, ESC
> I would like to have default ESC key processing in wxPanel the way
> wxDialog does it. I set wxEVT_CHAR on panel and every control in it.
> This way i can handle F2 key for example but not ESC key.
> What else should i do?
> Niki Spahiev
> wxPython-users maillist - [hidden email] > http://starship.python.net/mailman/listinfo/wxpython-users >