Questions tagged [copy-paste]

For issues relating to cut, copy, and paste operations.

The term "copy-and-paste" refers to the popular, simple method of reproducing text or other data from a source to a destination. It differs from cut and paste in that the original source text or data does not get deleted or removed. The popularity of this method stems from its simplicity and the ease with which users can move data between various applications visually – without resorting to permanent storage.

Source: Wikipedia

3477 questions
21
votes
2 answers

Paste text on Android using ADB?

This might seem like a duplicate question, but hear me out. I basically need to press "CTRL+V" inside of Android. I need to paste the current Android clipboard into the focused TextBox. So this: adb shell input text [text] won't do, as it requires…
Dysanix Official
  • 842
  • 1
  • 10
  • 18
21
votes
4 answers

How to propagate a signal through a collection of scripts?

I have an collection of scripts which are controlled by a main one. I want to trap the signal ctrl+c in the main script and propagate it to the others. The other scripts should trap this signal as well ( from the main script ) and do some clean-up…
Debugger
  • 9,130
  • 17
  • 45
  • 53
21
votes
7 answers

Enable copy and paste on UITextField without making it editable

I want the text in a UITextField (or ideally, a UILabel) to be non-editable, but at the same time give the user the ability to copy it to paste elsewhere.
mrueg
  • 8,185
  • 4
  • 44
  • 66
20
votes
2 answers

Copy image to clipboard with javascript in Chrome only

Is it possible to have javascript copy an image to a clipboard? I'm looking to replicate the "Copy Image" function that Chrome has when you Right/Control click an image in the browser. I've seen solutions for text, some Flash based solutions for…
Mike Jaffe
  • 562
  • 2
  • 5
  • 13
19
votes
2 answers

git clone vs copy paste, what's the difference?

as stated in the subject note: the git clone i mean is the git clone without any option, the one which is performed by doing "git clone /C:/my_origin_folder"
fajrian
  • 527
  • 1
  • 4
  • 14
19
votes
4 answers

PySerial: How to send Ctrl-C command on the serial line

I'm automating a configuration process for an embedded board. To enter the setup screen I need to send "Ctrl-C" command. This is NOT to interrupt a process I'm running locally, KeyboardInterrupt will not work. I need to send a value that will be…
Misha M
  • 10,979
  • 17
  • 53
  • 65
19
votes
3 answers

`kubectl cp` to a pod is failing because of Permission Denied

When I try to copy a small file to a Kubernetes pod, it fails with the following error: :~ $kubectl cp /tmp/a default/resolver-proxy-69dc786fcf-5rplg:/usr/local/bin/ --no-preserve=true tar: a: Cannot open: Permission denied tar: Exiting with…
19
votes
3 answers

How to overwrite files in VS Code on copy-paste (and not get a *.1* appended to the filename)?

Whenever I copy-paste a file in VS Code's project pane from one folder to another with an existing file of the same name, it keeps appending a .1 in the filename. (ex: bob.jpg -> bob.1.jpg). Is there a way to disable this and have it overwrite the…
chamberlainpi
  • 4,854
  • 8
  • 32
  • 63
19
votes
3 answers

How can replace string in quotes with string from buffer?

I'm doing the following to copy some text inside quotes and paste it in a different place (inside quotes as well): di" go-to-buffer-for-copy copy-string (ex. yi") then-go-to-prev-buffer paste-to-string (p) But I want to do it in a simpler way, like…
RusAlex
  • 8,245
  • 6
  • 36
  • 44
19
votes
2 answers

Copy & paste folded text in Visual Studio Code

Given the following text Node1_L1 Node1_L2 Node2_L2 Node2_L1 Node3_L2 Node1_L3 Node2_L3 Node4_L2 Node3_L3 Node4_L3 Node3_L1 Node5_L2 Node6_L2 I can use vscode's built-in folding feature to fold it to look like so +…
NoaHammer
  • 322
  • 2
  • 9
19
votes
6 answers

How can I fix "Cannot open clipboard: Access Denied" errors?

I am using the following code to copy text to the clipboard: Clipboard.Open; try Clipboard.AsText := GenerateClipboardText; finally Clipboard.Close; end; Seemingly at random I get "Cannot open clipboard: Access Denied" errors. I'm…
norgepaul
  • 6,013
  • 4
  • 43
  • 76
19
votes
1 answer

Paste a string as a variable, not as executable code snippet, into IPython

I'm aware of the magic IPython %paste command, which is quite useful, if you have valid code to insert. Now I don't want to insert code, I just want to store some string from the copy buffer as a variable. Is there a simpler way to do that, except…
Michael
  • 7,316
  • 1
  • 37
  • 63
18
votes
2 answers

Copy and paste in vim via keyboard between different mac terminals?

Can anyone help me with this: I'm trying to figure out how to copy and paste text between 2 different instances of vim on different terminals (using iterm2 or mac terminal). I can do it using the mouse if I do ":set mouse=a" but I'd like to be able…
Eddy
  • 6,661
  • 21
  • 58
  • 71
18
votes
6 answers

Pasting text into Android emulator clipboard using adb shell

I need to paste text into the Android emulator clipboard using adb shell. tried on Android 1.6 and 2.3.1 I tried to use adb shell command: clipboard:[android.text.iclipboard] "service call clipboard" where service codes are 1, 2, and 3, for…
Raptorion
  • 181
  • 1
  • 1
  • 5
18
votes
2 answers

How to get selected text from PDF opened in Chrome Browser from an extension

I have PDF opened in Chrome's new tab and want to copy text. Is there any solution to do this?
Vaso Beruashvili
  • 678
  • 2
  • 7
  • 14