-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
The Ctrl+V function of version 1.15.1 has no effect on some devices. #1658
Comments
When I use Ctrl+Shift+V on version 1.14, it can be pasted. |
In which apps? What if you copy some text from the device (either with Ctrl+c or with long-press, then Since v1.15, Ctrl+v does 2 things:
The changes between v1.14 and v1.15 could be confusing. There are 3 ways to paste:
See https://github.com/Genymobile/scrcpy#copy-paste
Does MOD+v work in v1.15? |
I tested MOD + V, but there is no response on these Android 7.1.2 devices, but it can be pasted in version 1.14. |
By the way, not all mobile phones will be like this, this problem only occurs on some Android 7.1.2 devices. |
Using one of these Android 7.1.2 devices, copy some text on the computer (with Ctrl+c), copy some text on the device (long-press, Then could you describe the result for each case: On v1.14:
On v1.15.1:
With adb:
|
On v1.14: On v1.15.1: With adb: |
Sorry, I meant MOD+Shift+v. |
MOD+Shift+v,cmd returns information: |
Without pasting any ASCII characters? |
MOD+Shift+V can paste ASCII characters. |
Could you please retest MOD+v and Ctrl+v on v1.15.1 + some more logs: diff --git a/app/src/input_manager.c b/app/src/input_manager.c
index 1d73980c..14fe73d6 100644
--- a/app/src/input_manager.c
+++ b/app/src/input_manager.c
@@ -177,6 +177,7 @@ collapse_notification_panel(struct controller *controller) {
static void
set_device_clipboard(struct controller *controller, bool paste) {
char *text = SDL_GetClipboardText();
+ LOGI("Computer clipboard: \"%s\"", text);
if (!text) {
LOGW("Could not get clipboard text: %s", SDL_GetError());
return;
diff --git a/server/src/main/java/com/genymobile/scrcpy/Controller.java b/server/src/main/java/com/genymobile/scrcpy/Controller.java
index 9100a9db..af3fe86a 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Controller.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Controller.java
@@ -117,6 +117,7 @@ public class Controller {
}
break;
case ControlMessage.TYPE_SET_CLIPBOARD:
+ Ln.i("Set device clipboard (" + msg.getPaste() + "): \"" + msg.getText() + "\"");
setClipboard(msg.getText(), msg.getPaste());
break;
case ControlMessage.TYPE_SET_SCREEN_POWER_MODE:
@@ -263,6 +264,7 @@ public class Controller {
// On Android >= 7, also press the PASTE key if requested
if (paste && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && device.supportsInputEvents()) {
+ Ln.i("Injecting PASTE");
device.injectKeycode(KeyEvent.KEYCODE_PASTE);
}
diff --git a/server/src/main/java/com/genymobile/scrcpy/Device.java b/server/src/main/java/com/genymobile/scrcpy/Device.java
index de551f35..73a38296 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Device.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Device.java
@@ -224,6 +224,7 @@ public final class Device {
String currentClipboard = getClipboardText();
if (currentClipboard == null || currentClipboard.equals(text)) {
+ Ln.i("Clipboard already set, ignoring");
// The clipboard already contains the requested text.
// Since pasting text from the computer involves setting the device clipboard, it could be set twice on a copy-paste. This would cause
// the clipboard listeners to be notified twice, and that would flood the Android keyboard clipboard history. To workaround this Here is a binary (replace it in you v1.15.1 release):
(if you are comfortable in applying diff and build to test, please tell me, it would avoid to generate a binary next time) |
Ctrl+V: MOD+V Neither method can paste this character into the device. |
In fact, I really look forward to your perfect implementation of the Ctrl+V paste method. |
Oh, got it! The condition was incorrect: 80a240c Could you please confirm that it fixes your problem?
|
Thanks, it can be pasted normally! |
Thank you so much, you can publish a fixed version! |
Thank you for your report and tests 👍 Merged in
Yes, the bug could require to publish v1.15.2, but I think that if everything is ok with the pinch-to-zoom implementation (#24 (comment)), I will probably just publish v1.16 soon. |
Very good, I am looking forward to it! |
(If you have time, I'm interested in tests/feedbacks for the pinch-to-zoom feature 😉) |
Fixed in v1.16. |
Hello, I found that when some of my Android 7.1.2 phones use version 1.15.1, the Ctrl+V key combination does not have any effect.
The text was updated successfully, but these errors were encountered: