def escapeSuppressor(evt):
"""wx.EVT_CHAR_HOOK handler that suppresses processing ESC.
By default, if you don't have a Cancel button, wx will trigger the
OK button when you press ESC. Binding this to a dialog will deactivate
the ESC key. We need this when there is no Cancel button.
"""
evt.Skip(evt.GetKeyCode() != wx.WXK_ESCAPE)
评论列表
文章目录