def on_char_hook(self, event): # handler for EVT_CHAR_HOOK events on preview windows if event.GetKeyCode() == wx.WXK_ESCAPE: wx.FindWindowById(event.GetId()).GetTopLevelParent().Close() return misc.handle_key_event(event, "preview")
def on_char_hook(self, event): misc.handle_key_event(event, "design")