Пример #1
0
 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)
Пример #2
0
    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)
Пример #3
0
    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)
Пример #4
0
 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)
Пример #5
0
 def on_key_press(self, widget, event):
     key, modifiers = keymap.translate_gtk_event(event)
     return self.emit('key-press', key, modifiers)
Пример #6
0
 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)