Hotrian / OpenVRDesktopDisplayPortal

Put your favorite Desktop Window directly into any OpenVR game!
Other
445 stars 97 forks source link

Add additional mouse functions #27

Closed Hotrian closed 7 years ago

Hotrian commented 7 years ago

Mouse simulation should support middle clicking as well as scroll wheel and click+drag. I was having a hard time figuring out how to simulate click+drag on a background window with the Win32 API (mouse press+move+mouse release doesn't seem to simulate a click+drag automatically), so that might not make the cut, but I would like to at least add middle click and scroll support before the next release.

Hotrian commented 7 years ago

So Click+Drag for SendInput works correctly, but I'll still have to do more work to determine if Click+Drag for SendMessage or SendNotifyMessage work correctly. Click+Drag will be coming for SendInput in v1.0.6.

Hotrian commented 7 years ago

Click+Drag is now implemented for SendInput in the latest source code.

Seems to work great, though I don't like that there's a 0.25 second delay between when you click+drag and when it's understood as a click+drag, but it's kind of the only way because unlike an actual Mouse it's kind of difficult to hold the controllers perfectly still (partially because the Lighthouse system is only so accurate), so moving the controllers can't immediately be interpreted as a click+drag, since it may have just been a click.

Hotrian commented 7 years ago

v1.0.6 has now been released and I'm closing this issue. I still intend to add Click+Drag support for SendMessage and SendNotifyMessage if possible, but I was unable to find a combination of commands that could simulate a Click+Drag command using those APIs.