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

Input (screen presses) via command line? #579

Open
GoldDust69 opened this issue Jun 8, 2019 · 8 comments
Open

Input (screen presses) via command line? #579

GoldDust69 opened this issue Jun 8, 2019 · 8 comments

Comments

@GoldDust69
Copy link

Hello,

It's not listed as a feature but please can you tell me if it's possible to register touches via the command line. By this I mean in specific locations, not just the home or back button for example.

I understand this to be a feature of ADB using the following command, however I was just curious if it's possible since the following code feels a little sluggish:

adb.exe -s XXXXXXXX shell input tap 350 1000

Alternatively if that's not a feature and you have an idea on how I can speed this up, I'd be super intrigued to hear.

Many thanks

@GoldDust69
Copy link
Author

GoldDust69 commented Jun 8, 2019

Just a quick follow up, I've read comment #231 (comment)

Which explains why it's much quicker however I am still left wondering if it's possible to use Scrcpy to input events as explained above.

Furthermore, if its not possible is there as easy method for me to speed this up (I'm quite a novice which is comes to this).

@TheRealMrSteel
Copy link

Definitely interested in this as well! I'm still looking for a way to use this together with some sort of mapping feature. Would be wonderful to map wasd to a onscreen joypad in a game (with touch coordinates) for example.

@GoldDust69
Copy link
Author

Yeah, I remain hopeful that's it's a feature which may be added

@imneonizer
Copy link

Hi there! I have solved the similar problem using scrcpy i.e sending command line touch inputs to your android phone.
You can check out this helpful repository
https://github.com/imneonizer/How-to-mirror-you-android-screen-with-opencv/blob/master/README.md

@imneonizer
Copy link

Definitely interested in this as well! I'm still looking for a way to use this together with some sort of mapping feature. Would be wonderful to map wasd to a onscreen joypad in a game (with touch coordinates) for example.

you can use keymapper like 'octopus' or 'panda keymaper', to specify which area to press with some sort of alphanumeric keymapping between your phone and computer and when you press that button on your computer keyboard, that area will be touched simulated on your phone.

@GoldDust69
Copy link
Author

Hi there! I have solved the similar problem using scrcpy i.e sending command line touch inputs to your android phone.
You can check out this helpful repository
https://github.com/imneonizer/How-to-mirror-you-android-screen-with-opencv/blob/master/README.md

Hey, thanks for your response. I'll take a look tonight but I am still interested in finding a solution to my problem. Perhaps this will help.

@TheRealMrSteel
Copy link

Definitely interested in this as well! I'm still looking for a way to use this together with some sort of mapping feature. Would be wonderful to map wasd to a onscreen joypad in a game (with touch coordinates) for example.

you can use keymapper like 'octopus' or 'panda keymaper', to specify which area to press with some sort of alphanumeric keymapping between your phone and computer and when you press that button on your computer keyboard, that area will be touched simulated on your phone.

Thanks, but I absolutely dont trust octopus or panda keymapper.
Thanks for your github link, I will definitely check it out!

I also found this, maybe it can be useful? https://github.com/Shyri/TouchMapper
Unfortunately the dev isn't working on the project anymore.

@srevinsaju
Copy link

Screen presses without scrcpy working is possible by individually opening the mapper module of guiscrcpy. srevinsaju/guiscrcpy#13
https://github.com/srevinsaju/guiscrcpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants