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.

http://en.wikipedia.org/wiki/Clipboard_(software)

4050 questions
225
votes
15 answers

How to send data to local clipboard from a remote SSH session

Borderline ServerFault question, but I'm programming some shell scripts, so I'm trying here first :) Most *nixes have a command that will let you pipe/redirect output to the local clipboard/pasteboard, and retrieve from same. On OS X these commands…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
214
votes
2 answers

Copy text to clipboard with iOS

What is the best way to copy text to the iPhone's clipboard in your application? Their docs are sketchy and have way more features than what I want... I just want to set a string as the users clipboard.
tarnfeld
  • 25,992
  • 41
  • 111
  • 146
193
votes
1 answer

How to copy text to the client's clipboard using jQuery?

The workflow is simple: You click inside a textarea. The text is copied to the client's clipboard. Display notice to the user. How do you do it?
mager
  • 4,813
  • 8
  • 29
  • 30
187
votes
7 answers

Copying text to the clipboard using Java

I want to copy text from a JTable's cell to the clipboard, making it available to be pasted into other programs such as Microsoft Word. I have the text from the JTable, but I am unsure how to copy it to the clipboard.
user765134
  • 1,873
  • 2
  • 12
  • 4
179
votes
2 answers

Secret copy to clipboard JavaScript function in Chrome and Firefox?

Update Looks like browsers are starting to support copy natively in JS In the console windows of both Chrome and Firefox on Mac I can execute copy("party in your clipboard!"); and the text gets copied to my clipboard. I have searched SO and Google…
Mike Grace
  • 16,636
  • 8
  • 59
  • 79
177
votes
7 answers

navigator.clipboard is undefined

Why is navigator.clipboard always undefined in the following snippet? var clipboard = navigator.clipboard; if (clipboard == undefined) { console.log('clipboard is undefined'); } else { clipboard.writeText('stuff to write').then(function() { …
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
171
votes
25 answers

Copy paste text into iOS simulator

This must be documented somewhere, but I can't find it. In my app using the iPad simulator there is a textfield into which I want the user to paste text. In the real world the user will copy the text from Safari address into the textfield. But I am…
zerowords
  • 2,915
  • 4
  • 29
  • 44
169
votes
3 answers

How do I capture bash output to the Mac OS X clipboard?

Is it possible to capture bash output to the OS X clipboard?
Stephen Handley
  • 2,325
  • 3
  • 19
  • 17
160
votes
4 answers

Get current clipboard content?

I'd like to know a way to make my script detect the content of the clipboard and paste it into a text field when the page is opened, with no input from the user. How can it be done?
kettlepot
  • 10,574
  • 28
  • 71
  • 100
157
votes
13 answers

Copying a rsa public key to clipboard

I am trying to copy a public key to the clipboard on macOS, but I keep getting "no such file or directory." The command I am using is pasted below pbcopy < ~/.ssh/id_rsa.pub
user1850254
  • 2,091
  • 3
  • 16
  • 17
152
votes
11 answers

Copy to clipboard in Node.js?

Is there a way you can copy to clipboard in Node.js? Any modules or ideas what so ever? I'm using Node.js on a desktop application. Hopefully that clears up why I want it to be able to achieve this.
Tower
  • 98,741
  • 129
  • 357
  • 507
149
votes
13 answers

Yank entire file

I often write something in gVim, then need to copy-paste it into another application. Is there an easy way to yank the entire file? I usually do something like this ggVG"+y (Go to top, visual-line mode, go to bottom, yank) But is there a better way…
Chad Birch
  • 73,098
  • 23
  • 151
  • 149
149
votes
15 answers

How do I read text from the Windows clipboard in Python?

How do I read text from the (windows) clipboard with python?
Foo42
  • 3,024
  • 4
  • 22
  • 17
123
votes
13 answers

The function to show current file's full path in mini buffer

I need to get the full path of the file that I'm editing with emacs. Is there a function for that? If not, what would be the elisp function for getting that? How can I copy the result (path name) to a clipboard so that I can reuse it? I'm using…
prosseek
  • 182,215
  • 215
  • 566
  • 871
117
votes
16 answers

Leave out quotes when copying from cell

Problem: When copying a cell from Excel outside of the program, double-quotes are added automatically. Details: I'm using Excel 2007 on a Windows 7 machine. If I have a cell with the following formula: ="1"&CHAR(9)&"SOME NOTES FOR LINE…
Aaron Thomas
  • 5,054
  • 8
  • 43
  • 89