(self, window, event)
Handle a keyboard event
Handle a keyboard event
Handle a keyboard event
def on_key_press(self, window, event):
        """Handle a keyboard event"""
        maker = Factory()

        self.set_urgency_hint(False)

        mapping = self.terminator.keybindings.lookup(event)

        if mapping:
            dbg('Window::on_key_press: looked up %r' % mapping)
            if mapping == 'full_screen':
                self.set_fullscreen(not self.isfullscreen)
            elif mapping == 'close_window':
                if not self.on_delete_event(window,
                        Gdk.Event.new(Gdk.EventType.DELETE)):
                    self.on_destroy_event(window,
                            Gdk.Event.new(Gdk.EventType.DESTROY))
            else:
                return(False)
            return(True)
def on_key_press ( self , window , event ) : maker = Factory ( ) self . set_urgency_hint ( False ) mapping = self . terminator . keybindings . lookup ( event ) if mapping : dbg ( 'Window::on_key_press: looked up %r' % mapping ) if mapping == 'full_screen' : self . set_fullscreen ( not self . isfullscreen ) elif mapping == 'close_window' : if not self . on_delete_event ( window , Gdk . Event . new ( Gdk . EventType . DELETE ) ) : self . on_destroy_event ( window , Gdk . Event . new ( Gdk . EventType . DESTROY ) ) else : return ( False ) return ( True )