The client has new ASCII text in its cut buffer.
           (aka clipboard)
961466
def clientCutText(self, message):
        
        self.transport.write(pack("!BxxxI", 6, len(message)) + message)
1302052
function (instance, td, row, col, prop, keyboardProxy, useOriginalValue, suffix) {
    if (texteditor.isCellEdited) {
      return;
    }

    keyboardProxy.on('cut.editor', function (event) {
      event.stopPropagation();
    });

    keyboardProxy.on('paste.editor', function (event) {
      event.stopPropagation();
    });

    var $td = $(td);

    if (!instance.getCellMeta(row, col).isWritable) {
      return;
    }

    texteditor.isCellEdited = true;

    if (useOriginalValue) {
      var original = instance.getDataAtCell(row, prop);
      original = Handsontable.helper.stringify(original) + (suffix || '');
      keyboardProxy.val(original);
      texteditor.setCaretPosition(keyboardProxy, original.length);
    }
    else {
      keyboardProxy.val('');
    }

    texteditor.refreshDimensions(instance, $td, keyboardProxy);
    keyboardProxy.parent().removeClass('htHidden');

    instance.rootElement.triggerHandler('beginediting.handsontable');

    setTimeout(function () {
      //async fix for Firefox 3.6.28 (needs manual testing)
      keyboardProxy.parent().css({
        overflow: 'visible'
      });
    }, 1);
  }
1289547
def paste_clipboard(self, event):
        
        log.critical("paste clipboard")
        clipboard = self.root.clipboard_get()
        for line in clipboard.splitlines():
            log.critical("paste line: %s", repr(line))
            self.add_user_input(line + "\r")
376721
function ( clipboardData, node, root ) {
    var body = node.ownerDocument.body;
    var html, text;

    // Firefox will add an extra new line for BRs at the end of block when
    // calculating innerText, even though they don't actually affect display.
    // So we need to remove them first.
    cleanupBRs( node, root, true );

    node.setAttribute( 'style',
                       'position:fixed;overflow:hidden;bottom:100%;right:100%;' );
    body.appendChild( node );
    html = node.innerHTML;
    text = node.innerText || node.textContent;

    // Firefox (and others?) returns unix line endings (\n) even on Windows.
    // If on Windows, normalise to \r\n, since Notepad and some other crappy
    // apps do not understand just \n.
    if ( isWin ) {
      text = text.replace( /\r?\n/g, '\r\n' );
    }

    clipboardData.setData( 'text/html', html );
    clipboardData.setData( 'text/plain', text );

    body.removeChild( node );
  }
528307
function detectEncoding(label, input_stream) {
      if (input_stream.match([0xFF, 0xFE])) {
        input_stream.offset(2);
        return 'utf-16';
      }
      if (input_stream.match([0xFE, 0xFF])) {
        input_stream.offset(2);
        return 'utf-16be';
      }
      if (input_stream.match([0xEF, 0xBB, 0xBF])) {
        input_stream.offset(3);
        return 'utf-8';
      }
      return label;
    }
627604
def copy(string):
    
    win32clipboard.OpenClipboard()
    win32clipboard.EmptyClipboard()
    win32clipboard.SetClipboardText(string)
    win32clipboard.CloseClipboard()
254373
private String string() {
    char quote = peek(0);
    int start = ++_x;
    boolean has_escapes = false;
    while (_x < _str.length()) {
      char c = peek(0);
      if (c == '\\') {
        has_escapes = true;
        char cc = peek(1);
        if (simpleEscapeSequences.containsKey(cc)) {
          _x += 2;
        } else if (cc == 'x') {
          _x += 4;   // e.g: \x5A
        } else if (cc == 'u') {
          _x += 6;   // e.g: \u1234
        } else if (cc == 'U') {
          _x += 10;  // e.g: \U0010FFFF
        } else
          throw new IllegalASTException("Invalid escape sequence \\" + cc);
      } else if (c == quote) {
        _x++;
        if (has_escapes) {
          StringBuilder sb = new StringBuilder();
          for (int i = start; i < _x - 1; i++) {
            char ch = _str.charAt(i);
            if (ch == '\\') {
              char cc = _str.charAt(++i);
              if (simpleEscapeSequences.containsKey(cc)) {
                sb.append(simpleEscapeSequences.get(cc));
              } else {
                int n = (cc == 'x')? 2 : (cc == 'u')? 4 : (cc == 'U')? 8 : -1;
                int hex = -1;
                try {
                  hex = StringUtils.unhex(_str.substring(i + 1, i + 1 + n));
                } catch (NumberFormatException e) {
                  throw new IllegalASTException(e.toString());
                }
                if (hex > 0x10FFFF)
                  throw new IllegalASTException("Illegal unicode codepoint " + hex);
                sb.append(Character.toChars(hex));
                i += n;
              }
            } else {
              sb.append(ch);
            }
          }
          return sb.toString();
        } else {
          return _str.substring(start, _x - 1);
        }
      } else {
        _x++;
      }
    }
    throw new IllegalASTException("Unterminated string at " + start);
  }
549828
function(Se){// Shortcuts
var ke=this.words,Ie=Se.words,Ae=this.sigBytes,we=Se.sigBytes;// Clamp excess bits
// Concat
if(this.clamp(),Ae%4)// Copy one byte at a time
for(var Ee=0,Pe;Ee<we;Ee++)Pe=255&Ie[Ee>>>2]>>>24-8*(Ee%4),ke[Ae+Ee>>>2]|=Pe<<24-8*((Ae+Ee)%4);else// Copy one word at a time
for(var Ee=0;Ee<we;Ee+=4)ke[Ae+Ee>>>2]=Ie[Ee>>>2];// Chainable
return this.sigBytes+=we,this}
856884
def paste(xsel=False):
    """"""
    selection = "primary" if xsel else "clipboard"
    try:
        return subprocess.Popen(["xclip", "-selection", selection, "-o"], stdout=subprocess.PIPE).communicate()[0].decode("utf-8")
    except OSError as why:
        raise XclipNotFound
506419
public void pasteClipboard() {
        Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
        try {
            if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                addContents((String) t.getTransferData(DataFlavor.stringFlavor));
                table.repaint();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
807520
private WsByteBuffer readData(WsByteBuffer unparsedData,
                                  WsByteBuffer scratchArea)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "readData", new Object[] {unparsedData, scratchArea});
      int scratchAreaRemaining = scratchArea.remaining();
      int scratchAreaUsed = scratchArea.position();
      WsByteBuffer retBuffer = null;

      if ((scratchAreaUsed == 0) &&
          (unparsedData.remaining() >= scratchAreaRemaining))
      {
         retBuffer = unparsedData;
      }
      else
      {
         int amountCopied = JFapUtils.copyWsByteBuffer(unparsedData,
                                                       scratchArea,
                                                       scratchAreaRemaining);
         if (amountCopied >= scratchAreaRemaining)
         {
            retBuffer = scratchArea;
            retBuffer.flip();
         }
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "readData", retBuffer);
      return retBuffer;
   }
987881
def secured_clipboard(item):
    
    expire_clock = time.time()
    def set_text(clipboard, selectiondata, info, data):
        # expire after 15 secs
        if 15.0 >= time.time() - expire_clock:
            selectiondata.set_text(item.get_secret())
            clipboard.clear()
    def clear(clipboard, data):
        """Clearing of the buffer is deferred this only gets called if the 
        paste is actually triggered
        """
        pass
    targets = [("STRING", 0, 0)
              ,("TEXT", 0, 1)
              ,("COMPOUND_TEXT", 0, 2)
              ,("UTF8_STRING", 0, 3)]
    cp = gtk.clipboard_get()
    cp.set_with_data(targets, set_text, clear)
621254
def paste(self):
        """"""
        clipboard = QApplication.clipboard()
        cliptext = ''
        if clipboard.mimeData().hasText():
            cliptext = to_text_string(clipboard.text())
        if cliptext.strip():
            self.import_from_string(cliptext, title=_("Import from clipboard"))
        else:
            QMessageBox.warning(self, _( "Empty clipboard"),
                                _("Nothing to be imported from clipboard."))
795797
def paste( self ):
        
        text = nativestring(QApplication.clipboard().text())
        for tag in text.split(','):
            tag = tag.strip()
            if ( self.isTagValid(tag) ):
                self.addTag(tag)
352157
def paste_from_clipboard(self):
        
        to = self.get_current_path()
        if os.path.isfile(to):
            to = os.path.abspath(os.path.join(to, os.pardir))
        mime = QtWidgets.QApplication.clipboard().mimeData()

        paste_operation = None
        if mime.hasFormat(self._UrlListMimeData.format(copy=True)):
            paste_operation = True
        elif mime.hasFormat(self._UrlListMimeData.format(copy=False)):
            paste_operation = False
        if paste_operation is not None:
            self._paste(
                self._UrlListMimeData.list_from(mime, copy=paste_operation),
                to, copy=paste_operation)
329814
def paste_clipboard_data(self, data, paste_mode=PasteMode.EMACS, count=1):
        
        assert isinstance(data, ClipboardData)
        assert paste_mode in (PasteMode.VI_BEFORE, PasteMode.VI_AFTER, PasteMode.EMACS)

        original_document = self.document
        self.document = self.document.paste_clipboard_data(data, paste_mode=paste_mode, count=count)

        # Remember original document. This assignment should come at the end,
        # because assigning to 'document' will erase it.
        self.document_before_paste = original_document
1321971
def paste_buffer(pymux, variables):
    
    pane = pymux.arrangement.get_active_pane()
    pane.process.write_input(get_app().clipboard.get_data().text, paste=True)