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

Windows touch and/or mouse injection. #17

Open
sasa42 opened this issue Jan 22, 2020 · 4 comments
Open

Windows touch and/or mouse injection. #17

sasa42 opened this issue Jan 22, 2020 · 4 comments

Comments

@sasa42
Copy link

sasa42 commented Jan 22, 2020

Would it be possible to interact on the received texture with the mouse.
The mouse movement is ececuted on the sender window?

@hecomi
Copy link
Owner

hecomi commented Feb 29, 2020

Sorry for my late reply...
You can not interact the window captured by uWindowCapture directly. But if you get the uv by a raycast and calculate the position in desktop with x, y, width, and height of the window, you can interact it by calling SendMessage Win32API with the position.

@Aminolroaya
Copy link

Aminolroaya commented Jan 14, 2022

Hello @hecomi. Thanks for your package. I saw that you have worked on interaction:
https://www.youtube.com/watch?v=YoFmszqILd4
Also, found UwcRayCastExample.cs in your codes. Is it possible to give more hints or share the code for this issue stream?
For example, in wcRayCastExample.cs when the ray hits which of windowCoord = result.windowCoord; or desktopCoord = result.desktopCoord; should be sent to SendMesssage. Can you also how we can SendMessage Win32API with the position?
BTW. I also found UTouchInjection repo, but it depends on UDesktopDuplication that does not work for me bc of GPU problem. How can I change that to work with UwindowCapture?

Thanks.

@hecomi
Copy link
Owner

hecomi commented Jan 16, 2022

How to send click message

I have uploaded an example of the code I used in the YouTube video below.

At that time, I used uTouchInjection to send the click message, but I think SendMouseClick() in the sciprt will also work. The point is to bring the window you want to click on to the forefront. For this purpose, SetForegroundWindow() is called first.

uTouchInjection

If you do not include the Samples directory, the dependency on uDesktopDuplication is removed. If you are installing from .unitypackage, uncheck the uDesktopDuplication + VR sample.

@Aminolroaya
Copy link

Aminolroaya commented Jan 17, 2022 via email

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