'Handles keystrokes.'

def _key(self, widg, event):

    if (event.state & gtk.gdk.CONTROL_MASK):
        if (event.keyval == self.key_f):
            self.show_search()
        elif (event.keyval == self.key_g):
            self._find(None, 'next')
        elif (event.keyval == self.key_G):
            self._find(None, 'previous')
        return True
    if (event.keyval == self.key_F3):
        if (event.state & gtk.gdk.SHIFT_MASK):
            self._find(None, 'previous')
        else:
            self._find(None, 'next')
    if (event.keyval == self.key_Esc):
        self._close(None, None)
    return False
