コード例 #1
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)
コード例 #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
ファイル: base.py プロジェクト: geoffl/mirovideoconverter3
 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)
コード例 #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)