def METHOD_NAME(self, widget, event):
    """Used to handle key events on the QListView of the combobox."""
    if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Delete:
        index = self.view().currentIndex().row()
        if index >= EXTERNAL_PATHS:
            # Remove item and update the view.
            self.removeItem(index)
            self.showPopup()
            # Set the view selection so that it doesn't bounce around.
            new_index = min(self.count() - 1, index)
            new_index = 0 if new_index < EXTERNAL_PATHS else new_index
            self.view().setCurrentIndex(self.model().index(new_index, 0))
            self.setCurrentIndex(new_index)
        return True
    return QComboBox.METHOD_NAME(self, widget, event)