def do_key_press_event(self, event): ret = keymap.translate_gtk_event(event) if ret == None: return gtk.Window.do_key_press_event(self, event) key, modifiers = ret if wrappermap.wrapper(self).emit('key-press', key, modifiers): return # handler returned True, don't process the key more return 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)
def on_key_press(self, widget, event): key, modifiers = keymap.translate_gtk_event(event) return self.emit('key-press', key, modifiers)
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)