-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't Ctrl+C text from Android to PC #145
Comments
For information, this feature would have the same implications as #8 (comment). |
I've read the implications as seen in #8 comment ... but I would really love this feature :) |
Could something like the code from clipper be used to get device clipboard text and write to PC clipboard when you press ctrl+c with scrcpy window focused? |
I though I would share the hacky solution I am using to get copying from device to PC working with scrcpy. I don't know if it is useful at all for scrcpy development but maybe it will be of use to someone. I am using a tasker profile to send the clipboard contents to logcat any time the clipboard changes:
It looks like this in
Then I have a script that I leave running while I am running scrcpy on my PC that continuously monitors logcat with another adb.exe instance and puts the output into the windows clipboard. |
On Ctrl+C: - the client sends a GET_CLIPBOARD command to the device; - the device retrieve its current clipboard text and sends it in a GET_CLIPBOARD device event; - the client sets this text as the system clipboard text, so that it can be pasted in another application. Fixes <#145>
I implemented it on the (the feature once all the preparation was done is implemented by 63c078e) To copy from the device to the computer:
To make it possible, I added a socket to send controls and video stream separately (ec71a3f). While I was there, I also implemented the other direction (c13a243), to copy from the computer to the device clipboard (without pasting), with I also refactored other things, in the end there are a lot of technical changes:
So please test the |
Doesn't work on Mac (using 1.10) |
@giorgiobeggiora Since v1.10, copy is Cmd+C on MacOS. Note that it copy your current Android clipboard, so you must have selected some text then press "Copy" to put some text in the clipboard. |
I followed the instructions, but the copy/paste from device to mac does not work :( |
Do you use Android 10? #796 |
OnePlus 6 (A6000) with Android 9 updated to August 2019 (OxygenOS 9.0.8) |
in some app, clicked copy button, then press c-c in scrcpy to get the clipboard, then c-v on pc. it worked but only pasted part of a very long text. |
Hmmm, yes, it is limited to 4k: Line 10 in 3935660
Line 14 in 3935660
We want some limit (to avoid arbitrary high values), but it is possible to increase (maybe to 64k to avoid changing the type?) Could you open a separate issue, please? |
I tried this, but was still not able to move text from android to PC, am only able yo copy from PC to android now Using scrcpy 1.8 x64 bit |
Same here. x64 W7 and W10 with 1.11, 1.12.1, 1.13 |
After step 1 and 2, does it print |
No, it does not, I can't see any output on the console after step 1 and 2
…On Wed, May 20, 2020 at 10:25 AM Romain Vimont ***@***.***> wrote:
I tried this, but was still not able to move text from android to PC
After step 1 and 2, does it print INFO: Device clipboard copied in the
console?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#145 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPOVWRDGI762RT2KSXK7DRSOO2BANCNFSM4E7FP76Q>
.
--
*BEST REGARDS*
Easal Investment Limited
Oyekan Abdul-wahab Comodity Trader
oyekanwahab@gmail.com
oyekanwahab@outlook.com
*whatsapp : *+2348120461617
Mobile: +2348120461617 | Phone: +2348101148147
skype id : oyekan.wahab
Lagos • Nigeria
This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received it by mistake, please let us know by e-mail reply and delete it
from your system; you may not copy this message or disclose its contents to
anyone. Please send us by fax any message containing deadlines as incoming
e-mails are not screened for response deadlines. The integrity and security
of this message cannot be guaranteed on the Internet.
|
@KeronCyst can you please reopen this issue |
Why? It's been working fine for me. Are you talking about the character count limit? If so, that should be a separate issue, no? |
@KeronCyst |
@oyekanwahab Could you test #1423 please? |
ok let me try it |
@rom1v it worked, thanks alot |
@rom1v It seems the issue occurs now again, this time on Android 14 on Honor magic4 pro device. |
There's probably a new security setting to enable/disable in developer options to allow clipboard capture. |
@rom1v Because of Honor? An unofficial thing? |
@AndroidDeveloperLB You should check. I don't know. It works on Android 14 on a Pixel 8. |
@rom1v I know it works. I have Pixel 6 and I can see it works. Should I create a new report, as it's probably specific to this device/OEM? |
Vysor can do this, I believe, but scrcpy v1.1 doesn't seem to be doing anything on my Huawei Honor 5X.
The text was updated successfully, but these errors were encountered: