def keyReleaseEvent(self, *args, **kwargs): self._editor.factory.command_key = False return TableView.keyReleaseEvent(self, *args, **kwargs)
def keyPressEvent(self, event): if event.modifiers() & Qt.ControlModifier: self._editor.factory.command_key = True else: return TableView.keyPressEvent(self, event)