code: def keyReleaseEvent( self, event ):
          
          # when the user releases the space bar, remove
          # the scene view edit override
          if ( event.key() == Qt.Key_Space ):
              self.setViewMode(False)
              event.accept()
          
          # otherwise, eat all other key press events until the 
          # view mode is released
          elif ( self.inViewMode() ):
              event.accept()
          
          # otherwise, handle the event like normal
          else:
              super(XNodeScene, self).keyPressEvent(event)
docs: Intercepts the Qt key released event to look for built-in overrides.
          
          :param      event       <QKeyReleaseEvent>