Questions tagged [clipboard]

The clipboard is a software facility that can be used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations.

It is most commonly a part of a GUI environment and is usually implemented as an anonymous, temporary block of memory that can be accessed from most or all programs within the environment via defined programming interfaces. A typical application accesses clipboard functionality by mapping user input (keybindings, menu selections, etc.) to these interfaces.

The semantics of the clipboard facility varies from one operating environment to another, and can also vary between versions of the same system. They can sometimes be changed programmatically or by user preference. This can lead to user frustration when switching between environments with different clipboard semantics particularly as copy and paste operations often become embedded in the user's muscle memory.

Most environments support a single clipboard transaction. Each cut or copy overwrites the previous contents. Normally, paste operations copy the contents, leaving the contents available in the clipboard for further pasting operations.

4050 questions
27 answers

How do I copy to the clipboard in JavaScript?

How do I copy text to the clipboard (multi-browser)? Related: How does Trello access the user's clipboard?
Santiago Corredoira
  • 47,267
  • 10
  • 52
  • 56
32 answers

Pipe to/from the clipboard in a Bash script

Is it possible to pipe to/from the clipboard in Bash? Whether it is piping to/from a device handle or using an auxiliary application, I can't find anything. For example, if /dev/clip was a device linking to the clipboard we could do: cat /dev/clip …
  • 134,091
  • 45
  • 190
  • 216
38 answers

How to make vim paste from (and copy to) system's clipboard?

Unlike other editors, vim stores copied text in its own clipboard. So, it's very hard for me to copy some text from a webpage and paste it into the current working file. It so happens I have to either open gedit or type it manually. Can I make vim…
Santosh Kumar
  • 26,475
  • 20
  • 67
  • 118
40 answers

How to copy to clipboard in Vim?

Is it possible to copy to clipboard directly from Vim? yy only copies stuff to Vim's internal buffer. I want to copy to the OS's clipboard. Is there any such command in Vim or you can only yank stuff within Vim?
Hari Menon
  • 33,649
  • 14
  • 85
  • 108
5 answers

How does Trello access the user's clipboard?

When you hover over a card in Trello and press Ctrl+C, the URL of this card is copied to the clipboard. How do they do this? As far as I can tell, there is no Flash movie involved. I've got Flashblock installed, and the Firefox network tab shows no…
  • 81,211
  • 44
  • 156
  • 212
25 answers

How can I copy the output of a command directly into my clipboard?

How can I pipe the output of a command into my clipboard and paste it back when using a terminal? For instance: cat file | clipboard
  • 113,822
  • 119
  • 272
  • 400
10 answers

How to copy data to clipboard in C#

How can I copy a string (e.g "hello") to the System Clipboard in C#, so next time I press CTRL+V I'll get "hello"?
  • 7,393
  • 10
  • 38
  • 49
31 answers

In reactJS, how to copy text to clipboard?

I'm using ReactJS and when a user clicks a link I want to copy some text to the clipboard. I am using Chrome 52 and I do not need to support any other browsers. I can't see why this code does not result in the data being copied to the clipboard.…
Duke Dougal
  • 24,359
  • 31
  • 91
  • 123
32 answers

How to Copy Text to Clipboard in Android?

Can anybody please tell me how to copy the text present in a particular textview to clipboard when a button is pressed? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
23 answers

JavaScript get clipboard data on paste event (Cross browser)

How can a web application detect a paste event and retrieve the data to be pasted? I would like to remove HTML content before the text is pasted into a rich text editor. Cleaning the text after being pasted afterwards works, but the problem is that…
  • 12,205
  • 7
  • 42
  • 52
8 answers

How do I copy the contents of a String to the clipboard in C#?

If I have some text in a String, how can I copy that to the clipboard so that the user can paste it into another window (for example, from my application to Notepad)?
  • 13,693
  • 23
  • 74
  • 128
8 answers

Python script to copy text to clipboard

I just need a python script that copies text to the clipboard. After the script gets executed i need the output of the text to be pasted to another source. Is it possible to write a python script that does this job?
  • 2,919
  • 2
  • 15
  • 9
29 answers

How do I copy a string to the clipboard?

I'm trying to make a basic Windows application that builds a string out of user input and then adds it to the clipboard. How do I copy a string to the clipboard using Python?
  • 22,441
  • 25
  • 88
  • 128
13 answers

Yank file name / path of current buffer in Vim

Assuming the current buffer is a file open for edit, so :e does not display E32: No file name. I would like to yank one or all of: The file name exactly as show on the status line, e.g. ~\myfile.txt A full path to the file, e.g.…
  • 17,000
  • 12
  • 60
  • 86
28 answers

How to copy a selection to the OS X clipboard

I have an area selected in Vim. How can I copy it into the OS X clipboard? (The OS X clipboard can be written to via a pipe to /usr/bin/pbcopy)
  • 47,148
  • 35
  • 106
  • 149
2 3
99 100