code: def copy(self):
          
          if self.has_selected_text():
              ConsoleBaseWidget.copy(self)
          elif not sys.platform == 'darwin':
              self.interrupt()
docs: Copy text to clipboard... or keyboard interrupt