def METHOD_NAME(self, event):
    if self.completer.isVisible():
        if event.key() in (
                Qt.Key_Enter,
                Qt.Key_Return,
                Qt.Key_Escape,
                Qt.Key_Tab,
                Qt.Key_Backtab):
            event.ignore()
            return
    isShortcut = (event.modifiers() == Qt.ControlModifier and \
                  event.key() == Qt.Key_Space)
    if not self.completer or not isShortcut:
        self.completer.setVisible(False)
        MDEditView.METHOD_NAME(self, event)
        return
    self.popupCompleter()