def METHOD_NAME(self, evt: QKeyEvent) -> None:
    if evt.key() in (Qt.Key.Key_Up, Qt.Key.Key_Down):
        # show completer on arrow key up/down
        if not self._completer.popup().isVisible():
            self.showCompleter()
        return
    if (
        evt.key() == Qt.Key.Key_Tab
        and evt.modifiers() & Qt.KeyboardModifier.ControlModifier
    ):
        # select next completion
        if not self._completer.popup().isVisible():
            self.showCompleter()
        index = self._completer.currentIndex()
        self._completer.popup().setCurrentIndex(index)
        cur_row = index.row()
        if not self._completer.setCurrentRow(cur_row + 1):
            self._completer.setCurrentRow(0)
        return
    if (
        evt.key() in (Qt.Key.Key_Enter, Qt.Key.Key_Return)
        and self._completer.popup().isVisible()
    ):
        # apply first completion if no suggestion selected
        selected_row = self._completer.popup().currentIndex().row()
        if selected_row == -1:
            self._completer.setCurrentRow(0)
            index = self._completer.currentIndex()
            self._completer.popup().setCurrentIndex(index)
        self.hideCompleter()
        QWidget.METHOD_NAME(self, evt)
        return
    QLineEdit.METHOD_NAME(self, evt)
    if not evt.text():
        # if it's a modifier, don't show
        return
    if evt.key() not in (
        Qt.Key.Key_Enter,
        Qt.Key.Key_Return,
        Qt.Key.Key_Escape,
        Qt.Key.Key_Space,
        Qt.Key.Key_Tab,
        Qt.Key.Key_Backspace,
        Qt.Key.Key_Delete,
    ):
        self.showCompleter()
    gui_hooks.tag_editor_did_process_key(self, evt)