Skip to content
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

Right-click and middle-click do not work #1233

Closed
Jackson013 opened this issue Mar 21, 2020 · 16 comments
Closed

Right-click and middle-click do not work #1233

Jackson013 opened this issue Mar 21, 2020 · 16 comments

Comments

@Jackson013
Copy link

In v1.12, I cannot return to home by Middle-click. and can't return back by right click, How can I solve this?

@rom1v
Copy link
Collaborator

rom1v commented Mar 21, 2020

Do other controls work?

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#control-issues

Does it work with another version?

@Jackson013
Copy link
Author

My computer has v1.9 and v1.12.1, all functions can be used normally in v1.9, right-click and middle-click in v1.12.1 are invalid, other functions are normal. It should be ADB version conflict, how should I solve it?

@Jackson013
Copy link
Author

C:\scrcpy-win64-v1.12.1>adb devices
adb server version (31) doesn't match this client (41); killing...

  • daemon started successfully
    List of devices attached
    0216926007992 device

@rom1v
Copy link
Collaborator

rom1v commented Mar 21, 2020

@Jackson013
Copy link
Author

I still do not solve the problem if I follow these methods.

@rom1v
Copy link
Collaborator

rom1v commented Mar 21, 2020

You have an app which starts an old adb (31). Find it and stop it.

@Jackson013
Copy link
Author

Microsoft Windows [版本 10.0.16299.547]
(c) 2017 Microsoft Corporation。保留所有权利。

C:\Users\1>adb usb
restarting in USB mode

C:\Users\1>adb version
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
Installed as C:\scrcpy-win64-v1.12.1\adb.exe

C:\Users\1>scrcpy
INFO: scrcpy 1.12.1 https://github.com/Genymobile/scrcpy
C:\scrcpy-win64-v1.12.1\scrcpy-server: 1 file pushed. 0.7 MB/s (26202 bytes in 0.036s)
java.io.FileNotFoundException: /data/system/theme_config/theme_compatibility.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:231)
at java.io.FileInputStream.(FileInputStream.java:165)
at java.io.FileInputStream.(FileInputStream.java:112)
at java.io.FileReader.(FileReader.java:58)
at miui.content.res.ThemeCompatibilityLoader.getVersion(ThemeCompatibilityLoader.java:108)
at miui.content.res.ThemeCompatibilityLoader.getConfigDocumentTree(ThemeCompatibilityLoader.java:126)
at miui.content.res.ThemeCompatibilityLoader.loadConfig(ThemeCompatibilityLoader.java:59)
at miui.content.res.ThemeCompatibility.(ThemeCompatibility.java:31)
at miui.content.res.ThemeCompatibility.isThemeEnabled(ThemeCompatibility.java:111)
at android.content.res.MiuiResourcesImpl.(MiuiResourcesImpl.java:40)
at android.content.res.Resources.(Resources.java:267)
at android.content.res.MiuiResources.(MiuiResources.java:49)
at android.content.res.Resources.getSystem(Resources.java:190)
at android.app.LoadedApk.(LoadedApk.java:211)
at android.app.ContextImpl.createSystemContext(ContextImpl.java:2331)
at android.app.ActivityThread.getSystemContext(ActivityThread.java:2168)
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.Workarounds.fillAppInfo(Workarounds.java:66)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:56)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
at com.genymobile.scrcpy.Server.main(Server.java:163)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:388)
INFO: Initial texture: 1080x2336

@Jackson013
Copy link
Author

Still can not use the right-click and middle-click functions, shortcuts and other functions are normal.

@rom1v
Copy link
Collaborator

rom1v commented Mar 22, 2020

And if you use v1.9 it works?

What about v1.10 and v1.11?

@Jackson013
Copy link
Author

v1.9 works, neither v1.10 nor v1.11 works.

@rom1v
Copy link
Collaborator

rom1v commented Mar 22, 2020

What if you use v1.12 (or v1.10 or v1.11), but overwrite SDL2.dll by the one from v1.9?

#1033

@Jackson013
Copy link
Author

Perfect solution, thank you!

@kkuhle
Copy link

kkuhle commented Apr 6, 2020

I am experiencing this behavior as well. I tried replacing SDL2.dll from v1.9 (and 1.8), but right-click (back) and middle-click (home) still do not work. They were working fine for me when I was on Android Pie (OOS OnePlus 6T). Now I've upgraded to Android 10 (still Oneplus 6T, but on HavocOS) and these shortcuts do not work. Other shortcuts still work fine (like fullscreen and even right-click to turn the screen on), but not as back/home. Any ideas?

@kkuhle
Copy link

kkuhle commented Apr 22, 2020

@rom1v I suspect the issue I'm encountering is something with the ROM I am running because it worked prior to the update and I've just verified it works on two other android devices today. I just tested again by downloading https://github.com/Genymobile/scrcpy/releases/download/v1.9/scrcpy-win64-v1.9.zip and running scrcpy.exe directly (also tried replacing SDL2.dll) from the 1.9/scrcpy-win64 directory.

I cannot find anything in developer options resembling #70

Any suggestions on where I can start troubleshooting to see if I can get this working on my primary device?

@rom1v
Copy link
Collaborator

rom1v commented Apr 22, 2020

Does adb shell input keyevent KEYCODE_HOME work?

@kkuhle
Copy link

kkuhle commented Apr 22, 2020

Thanks for the response! It doesn't work :( It's working on my test device though. I suppose that's the issue. I also tested KEYCODE_BACK which works on my test device and not my primary device. Seems that keyevents aren't implemented properly on this ROM...

Edit: I tried a bunch of other keyevents and they worked. For some reason, just HOME and BACK don't work.

Edit 2: APP_SWITCH also does not work on this device.

@rom1v rom1v closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants