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

HOME shortcut not working correctly on scrcpy v1.15 #1643

Closed
2 tasks done
zequip opened this issue Aug 6, 2020 · 22 comments
Closed
2 tasks done

HOME shortcut not working correctly on scrcpy v1.15 #1643

zequip opened this issue Aug 6, 2020 · 22 comments

Comments

@zequip
Copy link

zequip commented Aug 6, 2020

  • I have read the FAQ.

  • I have searched in existing issues.

  • OS: windows 10

  • scrcpy version: 1.15

  • device model: Samsung galaxy j7

  • Android version: Android 8.1.0

All desktop shortcuts stopped working on the latest scrcpy release (V1.15), only left and right click are recognized. If I rollback to V1.14 everything works as intended.

EDIT: remaining issue: only the HOME shortcut is sometimes broken #1643 (comment)

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

v1.15 now forwards Ctrl (and Shift) to the device, so the shortcut modifier (MOD) had to be changed. By default, it's Alt or Super.

See:

#1642

@zequip
Copy link
Author

zequip commented Aug 6, 2020

I see, I read the changelog but I didn't realize the change. My bad...
I'm still having problems with middle click (home button). It works fine for a couple of seconds after startup, then it stops detecting it.

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

Oh, you're not the only one 😕 #1598 (comment)

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

Did you have the same problem on v1.14?

@zequip
Copy link
Author

zequip commented Aug 6, 2020

No problem on v1.14.

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

That's very weird, I could not reproduce.

Could you add this log, please:

diff --git a/app/src/input_manager.c b/app/src/input_manager.c
index 02dd9cb5..cf557716 100644
--- a/app/src/input_manager.c
+++ b/app/src/input_manager.c
@@ -582,6 +582,7 @@ input_manager_process_mouse_button(struct input_manager *im,
                                    const SDL_MouseButtonEvent *event) {
     bool control = im->control;
 
+    LOGD("mouse button type=%d, which=%d, button=%d", event->type, event->which, event->button);
     if (event->which == SDL_TOUCH_MOUSEID) {
         // simulated from touch events, so it's a duplicate
         return;

And when middle click fails, please post the line it prints in the console.

cc @AzureRaptor

@zequip
Copy link
Author

zequip commented Aug 6, 2020

I'm sorry... Where should I add that?

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

OK, here is a build:

  • scrcpy.exe
    SHA256: 97437b46f4e540e9aa51ede53fdc130615af71de74668b85d3bd53850e9ec621

(replace it in your v1.15 release)

EDIT: run with scrcpy -Vdebug

@zequip
Copy link
Author

zequip commented Aug 6, 2020

This one didn't work from the start. I noticed it does work on the lockscreen but once the device is awake it stops detecting it (Alt-H isn't working either)

I'm sorry I can't be more helpful with logs and stuff, I'm not very experienced

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

I'm sorry I can't be more helpful with logs and stuff

Oh, I put a debug log, so it is not printed by default (should have added an info log for simplicity).

Could you please run with scrcpy -Vdebug?

Press Windows+r, type cmd and press Enter.
In the terminal, type cd C:\Users\...(your path to scrcpy)...
Then scrcpy -Vdebug.

It should print logs when you press middle-click. Copy-paste them here.

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

Nevermind, here is a build with an INFO log:

  • scrcpy.exe
    SHA256: d79c39debe2306471f9f4625c77f2694c4b402380dc628cea3ea9e739a0cec7a

(replace it in your v1.15 release)

@rom1v
Copy link
Collaborator

rom1v commented Aug 6, 2020

once the device is awake it stops detecting it (Alt-H isn't working either)

When HOME stops working, what if you execute adb shell input keyevent HOME?

Press Windows+r, type cmd and press Enter.
In the terminal, type cd C:\Users\...(your path to scrcpy)... and press Enter.
Then type adb shell input keyevent HOME and press Enter.

@zequip
Copy link
Author

zequip commented Aug 7, 2020

the log says:

INFO: mouse button type=1025, which=0, button=2 (when I press middle-click)
INFO: mouse button type=1026, which=0, button=2 (when I release middle-click)

adb shell input keyevent HOME worked

@zequip
Copy link
Author

zequip commented Aug 7, 2020

Just in case I wasn't clear... the command worked at sending the home button, it didn't however fix the problem.

Also, the latest adb packaged with scrcpy fails at connecting wirelessly, is doesn't seem to be related to scrcpy because it works if I replace it with the previous version of adb.

@rom1v
Copy link
Collaborator

rom1v commented Aug 7, 2020

Oh, I think I found a possible cause for the broken HOME shortcut. Here is a fix: 8fb0192

  • scrcpy.exe
    SHA256: b91b1f560c60d7ee8504e5cf2fa6d3766394c21dcfa45605aaef90e7e69c6fd6

Does it fix the problem for you? @zequip @AzureRaptor

@rom1v rom1v changed the title Desktop shortcuts not working on latest Scrcpy HOME shortcut not working correctly on latest Scrcpy Aug 7, 2020
@zequip
Copy link
Author

zequip commented Aug 7, 2020

Fixed!!

@rom1v
Copy link
Collaborator

rom1v commented Aug 7, 2020

Thank you. I will release a new version 1.15.1 soon then.

@rom1v
Copy link
Collaborator

rom1v commented Aug 7, 2020

the latest adb packaged with scrcpy fails at connecting wirelessly

I tested this morning on Windows, it works for me.

@zequip
Copy link
Author

zequip commented Aug 7, 2020

no, thank YOU!! for the fix and for the amazing app.

I let you decide if the thread should be left open or closed.

@zequip
Copy link
Author

zequip commented Aug 7, 2020

I tested this morning on Windows, it works for me.

I might be having some overlapping issue with the previous adb, then‽ It's weird because it works just fine while connected through USB...
I tried deleting .android folder on %userprofile% but this wasn't enough. Do you know if there's any other location where some other configuration file might be hiding? I'm trying to attempt a "clean install"

@rom1v rom1v changed the title HOME shortcut not working correctly on latest Scrcpy HOME shortcut not working correctly on scrcpy v1.15 Aug 7, 2020
@zequip
Copy link
Author

zequip commented Aug 7, 2020

Disregard everything I said about ADB. I don't know exactly what I did but it's working now.

@rom1v rom1v closed this as completed in 9767619 Aug 7, 2020
@rom1v
Copy link
Collaborator

rom1v commented Aug 7, 2020

Fixed in v1.15.1.

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

2 participants