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

Changing windows size breaks keyboard #5388

Open
sunarowicz opened this issue Oct 20, 2024 · 4 comments
Open

Changing windows size breaks keyboard #5388

sunarowicz opened this issue Oct 20, 2024 · 4 comments

Comments

@sunarowicz
Copy link

sunarowicz commented Oct 20, 2024

When I use physical keyboard simulation (the -K switch) resizing scrcpy window or starting it with shrinked window (e.g. with --window-width=1024) breaks keyboard functionality. It starts to send the shortcuts instead of typing the text, i.e. when I press the "f" key (without pressing the MOD key) it performs the fullscreen action instead of typing the "f" character. Interestingly it sometimes works fine after starting scrcpy in shrinked window, but breaks as soon as I resize window with mouse.

It happens with every android device I use scrcpy with. But it is not the case if I use the default SDK keyboard mode with --shortcut-mod=rctrl and --prefer-text switches. Without these it happens too.

I run scrcpy version 2.7 builded from source on Ubuntu 24.04 running on arm64 SBC. The issue was presented in the version 2.4 too. If I remember well, in some even earlier versions there was no such issue.

This problem is driving me crazy, does anyone have any ideas on how to solve it? Thx.

@sunarowicz
Copy link
Author

UPDATE: I just realized, that when I press the single SUPER key (without any other keys) the issue disappears and text is being typed into scrcpy window instead of passing scrcpy shortcuts again. Then I can use shortcuts with the combination of SUPER and other keys as one would expect. Even resizing the scrcpy window with mouse does not break the correct functionality then.

So it seems to me like under some circumstances I mentioned in my previous post the shortcut modifier key (SUPER key in my case) being activated and locked without touching by user. At least until manually being pressed by user. Really weird...

I forgot to mention that I'm using KDE Plasma.

@rom1v
Copy link
Collaborator

rom1v commented Oct 20, 2024

Weird, I'll make some test.

Meanwhile, could you test #5322 (merged after 2.7), maybe it solves your problem.

@rom1v
Copy link
Collaborator

rom1v commented Oct 21, 2024

I cannot reproduce on XFCE (both 2.7 and current dev branch). Probably an issue with SDL+KDE I would say (where a "release" key event may be lost, so SDL still thinks Alt is pressed).

@sunarowicz
Copy link
Author

Thank you for your investigation and your time, I really appreciate it! But it really doesn't seem to be issue with scrcpy as I can tell now. You can close this.

I do not see this problem anymore after my yesterdays pressing the SUPER key while scrcpy window had focus. It had to be something "hanging" in my system (maybe in terminal window I'm launching scrcpy from), not a scrcpy issue. Frankly I almost do not use the SUPER key in my real life and I have been not using scrcpy shortcuts until now neither. So trying to press the modifier key to solve this problem didn't came to my mind earlier, unfortunately...:o)

Thank you for your support!

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