(self, widget, event)
Handle keypress events
Handle keypress events
Handle keypress events
def search_keypress(self, widget, event):
        """Handle keypress events"""
        key = Gdk.keyval_name(event.keyval)
        if key == 'Escape':
            self.end_search()
        else:
            self.prev.set_sensitive(False)
            self.next.set_sensitive(False)
def search_keypress ( self , widget , event ) : key = Gdk . keyval_name ( event . keyval ) if key == 'Escape' : self . end_search ( ) else : self . prev . set_sensitive ( False ) self . next . set_sensitive ( False )