elvissteinjr / DesktopPlus

Advanced desktop access for OpenVR
GNU General Public License v3.0
462 stars 29 forks source link

Desktop mouse in detached state #1

Closed mdovgialo closed 4 years ago

mdovgialo commented 4 years ago

I might have missed something in configuration, but maybe not.

Is it possible to interact with desktop panel in detached state, while not having overlay open? I know it could interfere with games, but is it possible? Is there a setting for it?

elvissteinjr commented 4 years ago

There is a way to do this, yes. You can configure an input to activate laser pointer interaction on the overlay in Desktop+' SteamVR Input bindings. The laser pointer is automatically turned off when it leaves the overlay again (active laser pointer is a global state that steals all input from the active scene application). Note that SteamVR currently only lists overlay applications in the old input binding interface, so that one has to be used.

There hasn't been much testing on that feature, so if there's issues with it, please report.

A way to do the same without extra inputs by just pointing doesn't exist yet, but should be fairly simple to do, thinking about it. I'll look into that as an option as well.

mdovgialo commented 4 years ago

You can configure an input to activate laser pointer interaction on the overlay in Desktop+

This is exactly what I need, I just need to assign a chord/button for it, right? This solves the problem with accidental clicks too. Great! Thanks!

mdovgialo commented 4 years ago

It works pretty well, as I expected. Only thing I miss is to be able to bind "detached state toggle" right now I have to hold the button/chord to keep the desktop overlay detached. It would be nice if it was toggle-able - press once to make it detached, press again to attach. It is useful to glance over some IM messages without opening the overlay, but sometimes I wish it stayed.

Also when mouse is active it would be nice to have a keyboard too.

elvissteinjr commented 4 years ago

You should be able to set the SteamVR Input action itself to be a toggle. That's why Desktop+ doesn't provide this functionality.

Though I'm not entirely sure what happens when you enable laser pointer input with that, as it changes the active SteamVR Input action set to the overlay laser pointer one (nothing can be done about this), which does drop all inputs usually, but not sure about toggles. Sound like something I should take a look at myself again.

mdovgialo commented 4 years ago

I tried to set a chord with buttons set as toggles, but unfortunately it just makes the overlay keep switching detached state from enabled to disabled indefinitely while I keep the chord buttons held. It sets itself back to attached when I release the chord.

elvissteinjr commented 4 years ago

I did a pretty simple fix (ignore any state change from that binding while global laser pointer input is active) and it seems to work fine now (I tested with "set deatched" as a toggle and "enable interaction" as a normal binding). But before I push that change in vain, can check if this build solves the issue for you? DesktopPlus_Issue1_Fix.zip

Further improvements on using the overlay like this are on my list, like the previously mentioned plain point-to-active variant as well as optionally restricting the activation binding only when already pointing at the overlay. Trying to get it to deactivate without ever pointing at the overlay can be confusing, so those would probably help a bit.

elvissteinjr commented 4 years ago

I've pushed the change for now, but if there are still issues, feel free to re-open this.

mdovgialo commented 4 years ago

Sorry, I didn't have chance to test it. Just tested the change. Yea, it does what I want. If I use the chord to unattach (it makes the overlay appear in the scene) and then at the same time use the chord to activate mouse the overlay stays there until I again use the chord to deattach. This is exactly what I wanted. Thank you!