scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

copy text from pc to phone

Open Karan-Sahota opened this issue 3 years ago • 16 comments

  • I have checked that a similar [feature request does not already exist.

i 've used the copy past function to copy and paste text from phone to pc but not the other way

** i realy don't know if its possible or not but it would be great if we could also copy text from pc to phone that would save a lot of time of moving text here and there

Karan-Sahota avatar Dec 06 '22 17:12 Karan-Sahota

In theory, it works by default. However, on some devices (especially Samsung devices it seems), it does not work because setting the device clipboard does not work.

In that case, you can pass --legacy-paste to inject characters one by one.

See:

  • https://github.com/Genymobile/scrcpy#copy-paste
  • d5f059c7cbef7d13889086670716d9f33f805dc4

rom1v avatar Dec 06 '22 20:12 rom1v

@rom1v For me, it always worked fine on my Pixel 6 device. However, on the recent Android 13 update, I've noticed that indeed the clipboard sharing between PC and device is broken. I can't paste from PC to device, and the opposite (from device to PC).

Can you please check?

My Android build: TQ1A.221205.011

AndroidDeveloperLB avatar Dec 11 '22 16:12 AndroidDeveloperLB

Having the same issue, used to copy and paste from my PC all the time but it no longer works on Pixel 6 Android 13.

chilicoke avatar Dec 14 '22 20:12 chilicoke

@chilicoke Do you have perhaps the same build as me? I wonder if on the beta it happens, too

AndroidDeveloperLB avatar Dec 14 '22 20:12 AndroidDeveloperLB

I'm on the same TQ1A.221205.011 build, never been on Beta on this phone.

chilicoke avatar Dec 14 '22 21:12 chilicoke

@chilicoke Check out https://github.com/Genymobile/scrcpy/issues/3497#issuecomment-1246780900. It fixes the issue for me with the same build.

drothenberger avatar Dec 15 '22 00:12 drothenberger

@chilicoke Check out #3497 (comment). It fixes the issue for me with the same build.

That fixed it! Absolutely perfect, thank you so much!

chilicoke avatar Dec 15 '22 01:12 chilicoke

@drothenberger This worked for me. How did you find it? Why isn't it on the releases ?

AndroidDeveloperLB avatar Dec 15 '22 06:12 AndroidDeveloperLB

I just posted a link to a comment by the developer in another similar issue that contains a fix. I assume the dev will include it in the next release.

drothenberger avatar Dec 15 '22 06:12 drothenberger

@drothenberger Thank you! I was beginning to think that ScrCpy won't work well anymore on Android, because of yet more restrictions that Google adds to it...

AndroidDeveloperLB avatar Dec 15 '22 07:12 AndroidDeveloperLB

Unfortunately I was never able to correctly use the clipboard (Windows 10) on an Android 10 using a Samsung Galaxy J4. When I inject characters one by one (legacy paste or Shift Alt V), it sends all break lines like "Enter / Ctrl Enter", sending messages in chats. The only alternative I found was to use Microsoft's SwiftKey app to sync my Windows clipboard with my Android clipboard.

ronvdlg avatar Dec 23 '22 13:12 ronvdlg