def do_key_press_event(self, event): if self.activate_key(event): # event activated a menu item return if self.propagate_key_event(event): # event handled by widget return ret = keymap.translate_gtk_event(event) if ret is not None: key, modifiers = ret rv = wrappermap.wrapper(self).emit('key-press', key, modifiers) if not rv: gtk.Window.do_key_press_event(self, event)
def do_key_press_event(self, event): if self.activate_key(event): # event activated a menu item return if self.propagate_key_event(event): # event handled by widget return ret = keymap.translate_gtk_event(event) if ret is not None: key, modifiers = ret rv = wrappermap.wrapper(self).emit("key-press", key, modifiers) if not rv: gtk.Window.do_key_press_event(self, event)
def on_key_press(self, widget, event): key_modifiers = keymap.translate_gtk_event(event) if key_modifiers: key, modifiers = key_modifiers return self.emit('key-press', key, modifiers)