-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Support touchscreen input #22
Comments
Hmm, I thought a touch screen just generated mouse events. Does it work with a mouse? |
Works with a mouse. Touchscreen is just flat out ignored. Acts as a mouse elsewhere which is weird. It still shows the cursor going over the scrcpy window but tapping/dragging does nothing. |
I guess you need to catch https://wiki.libsdl.org/SDL_TouchFingerEvent |
I had the same issue on Linux and an external touch monitor. As a workaround you can use Touchégg with some configuration and additional gesture |
just mouse event |
Any update on this? |
Hi, I started to implement it, but I have no touch screen, so I cannot test. If someone want to test (and help to fix if it does not work), I pushed a branch: |
It seems to be way too sensitive towards long presses. And I don't think it's matching the location where I'm touching. |
@parkerlreed Thank you for your feedbacks. I'm not very surprised 😄 I really need to get a laptop with a touchscreen. |
Seems to work now: Please give me your feedbacks. I will rewrite the commits properly when I have time. |
Here are some binaries, if you can't build it:
|
Merged in |
Quick question, if I update my files to reflect the changes you've made on the development branch can I expect touchscreen to work, or will I have to rebuild from source/ wait for the snap release? ?? |
Which files? You can reflect the changes on the source files, then build from the (modified) sources, but then why not just take the |
I replicated all the changes to all the files you made on Oct 02 & 3rd. Rebooted and reloaded everything. Touchscreen inputs still not recognised by scrcpy. I tried manual build from source before but didn't work. Ended up using snap |
What did you do exactly? What did you "reloaded"? If you edit the source files, you need to build from these new sources… |
I noticed the last update to the Snap package was the 5th October so I tried re-installing with Snap using the edge channel. No touchscreen. I removed snap and I am now revisiting building from source (a
If I then switch to a non-root user and run the If I proceed to do I also ran release.sh while playing around and this is what I got: The Meson build system
Ok: 5 Full log written to /opt/scrcpy/build_test/meson-logs/testlog.txt
FAILURE: Build failed with an exception.
Using Android SDK: /usr/lib/android-sdk
BUILD FAILED in 4s |
I ran the command
Ended up going with VNC and Emteria until the snap version of ScrCpy (with the touchscreen fixes) is released. Keep up the great work |
@unclehowell, the snap from the edge channnel now is built from the dev branch. |
You rock pal. Keep up the great work. |
hey @rom1v ! I was trying to get this to work on my ubuntu touchscreen laptop as my phone display is dead. but i couldnt build this specific branch finger.5. I installed latest branch with install_release.sh and it worked fine. but there is no such script in this branch so i copied it over and ran it but i get error " with open('META-INF/MANIFEST.MF', 'r+', encoding='utf-8') as f: |
That's very old. The feature has been merged in the
OK, great! What's the problem then?
Which script? What are you trying to do? |
@rom1v Thanks for replying!
it works fine except the touch feature. so i went searching i found this issue and thought that i should install finger branch. i didnt realize if was merged. sorry I'm a newbie. I have ubuntu 22.04 lts on my laptop and the touch works with even two finger zoom gestures. could this be a problem of ubuntu? do you have any suggestions?
i figured out how to run finger.5 branch but i still get following error when i run it with ./run x [server] ERROR: Exception on thread Thread[main,5,main] java.lang.IllegalArgumentException: Expecting 6 parameters at com.genymobile.scrcpy.Server.createOptions(Server.java:71) at com.genymobile.scrcpy.Server.main(Server.java:132) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:339) ERROR: Server connection failed but i don't think it really matters now that i know that it has been merged into master. |
problem description: the touch works for laptop for clicking , scrolling or zooming but it is not recognized at all in scrcpy window |
What is the reslut of |
scrcpy 2.5 https://github.com/Genymobile/scrcpy Dependencies (compiled / linked):
|
OK, it's not the latest version (2.6.1), but it should still work. I just tested on my compter with a touch screen, it works. Run |
android device version android 10 and ubuntu version 22.04 lts |
when i touch or swipe it does print up or down events in console. so it is picking it up but they are not reflected on the phone. |
I guess you posted just an excerpt, but in before the |
Can you test with another device on the same computer? |
yeah, i just tested on another phone redmi 10A , android 11 and its the same thing. Also because previously some people have mentioned getting a cursor on touch. On my ubuntu laptop when i use touch the cursor disappears and the touch is used like mobile phone. and when i use the mouse again the cursor reappears. if that means anything. |
do you need any additional information about my computer? i can provide that |
If that's the same problem on several devices, the problem is on the client. So maybe the SDL version has a problem with that. Just to be sure, can you install and test the very last version (2.6.1), there were some changes related to mouse events (even if touch is expected to work also on 2.5). |
I'm onto that. I'll let you know |
@rom1v Thanks a lot! ('-')7. I just installed latest release and it works, on both devices. I'm sorry I troubled you without first testing on the latest version. There's another issue i want to mention on Samsung when i first connect the cable then the allow file access pop up comes. if I tap allow it instantly kills the session. here are the logs |
That's "expected": when you change between USB modes, the device resets the USB layer, and the adb connection is closed. This is not specific to scrcpy: if you run separately |
Oh okay. and thanks again! |
My laptop has a touch screen but trying to control my phone with it doesn't seem to do anything at all. It would be nice if touch input was also supported.
The text was updated successfully, but these errors were encountered: