'React to release events, handle completion'

def keyReleaseEvent(self, event):

    key = event.key()
    visible = self.was_visible()
    if (not visible):
        try:
            event.accept()
            msg = self.NAVIGATION_KEYS[key]
            signal = getattr(self, msg)
            signal.emit()
            return
        except KeyError:
            pass
    result = text.HintedLineEdit.keyReleaseEvent(self, event)
    selection = self.completion_selection()
    if (visible and selection and (key in self.ACTIVATION_KEYS)):
        self.choose_completion(selection)
        self.activated.emit()
        return
    return result
