MouseMasterVR - Mouse functions utility app
-
MouseMasterVR
by SemlerPDX
Mouse Cursor Centering & Scroll Wheel Rebind AppThis is a very simple mouse cursor centering app which forces the mouse to remain centered when the target application is in focus, set to Falcon BMS by default. This feature is designed for use with certain software in VR where constant mouse centering is desireable, such as the new VR mode for Falcon BMS.
When this program is running, and the ON/OFF toggle switch is ON, and the target program is in focus, the mouse cannot be moved from center - use ALT+TAB to switch to this app to toggle the main ‘power’ switch. You can use the hotkeys CTRL+Arrow Key [any] to snap the app to the center of the primary screen.
When used with Falcon BMS as the target, mouse centering will only engage when flying. Of course, latest BMS update (U1) includes this centering option natively, and so this functionality example is dated at time of release, and will simply remain as a learning project and open source application demonstration, or may even develop into a more complete mouse utility app. I’m quite glad for the experience, and this framework I’ve created may evolve into other applications one day, even custom GUI panels in my AVCS profiles for VoiceAttack.
To extend the usefulness of this application, users can also rebind the mouse scroll wheel up or down actions to any single keypress. A half-second debounce delay lets us scroll forward or back several ticks in a single action to output a single keypress, preventing the wheel from issuing a string of keypresses - no need to carefully tick the scroll wheel just one bump.
Current features:
- Mouse Cursor Centering when target process is in focus, and only if main toggle is ON
- Mouse Centering for Falcon BMS only when flying in cockpit via BMS Shared Memory data
- Mouse Scroll Up/Down can be rebound to issue any (single) keypress, no modifier keys (yet)
- Mouse Scroll rebinds are not ‘one keypress per detent’, with a default 0.5 second debounce
- Hotkeys when app in focus, CTRL+Arrow Key [any] to center app, ALT+F4 to gracefully close
- Manual or Automatic Updates will present pop-up choice if update found on app launch
Click link to DOWNLOAD, or clone the repository on GitHub & compile the app!
https://veterans-gaming.com/semlerpdx/vglabs/apps/mousemastervr/
Latest Changelog & Checksum: CLICK HERE
This app is in a Public Beta Test as of Jan2023 - Please report any bugs or issues!
This little app does just a few things, for some fairly specific circumstances such as VR applications without a native mouse cursor centering option, or for rare occasions where we’d like to rebind our mouse scroll wheel up and down actions to a keypress of our choosing. I’ve had more than a few mice with included rebinding software, and have never seen an option for setting a scroll wheel keypress rebind for games. I’d entertain any ideas for related mouse features to add, or things I can improve.
Planned features:
- Mouse Rebinds which could allow any joystick button to be set as Mouse Left or Right Click
- Mouse Scroll Up/Down rebind option to output any existing joystick or Xbox controller button
- Generic Mouse Button rebind for those cheap mice with thumb buttons but no rebind software
Questions I have for this Public Beta:
Does this work and work well? Should I improve or change anything (beyond the planned features above)? Should I include any other features? Am I using MVVM concepts properly?
Authors Note
I have past experience with Windows Forms Apps and C#, but this is my first real use of GitHub and my first WPF app - I’m writing in Visual Studio Community 2019, and I use PhotoShop for my images. While I’m as self-conscious as any self-taught coder new to something, I very much want feedback on my structure and use of methods as it relates to best practices or common solutions in WPF, and my attempt to follow an MVVM structure. I expect I have made several odd choices and potentially non-standard methods. I hope to continue making WPF apps, and that this is the first of many such open source projects.
Thanks for checking out MouseMasterVR!
SemlerPDX Jan2023
-
-
Hello !
I know this post is quite old, so not sure if it is still active ?
First of all, thank you for your efforts concerning this. I have a couple of questions regarding the mouse in VR and you seem to be knowledgeable.When in VR, I seem to be loosing the mouse to an “infinite sized screen”. Alas when the mouse leaves the visible portion, it is a literal mouse hunt to get it back.
I mapped the “SimToggleCursorCenter” hotkey to snap it back to the middle and the free it up again, but it is not very easy to do and kind of counter productive.Is there a way to have a key to snap it back to the middle and for the mouse to be “free” again right away ? Would your tool allow that ?
Thank you !
Flow.
-
@SemlerPDX Wow, can’t believe I missed this. Will try it out!
-
@Flow32 said in MouseMasterVR - Mouse functions utility app:
Hello !
I know this post is quite old, so not sure if it is still active ?
First of all, thank you for your efforts concerning this. I have a couple of questions regarding the mouse in VR and you seem to be knowledgeable.When in VR, I seem to be loosing the mouse to an “infinite sized screen”. Alas when the mouse leaves the visible portion, it is a literal mouse hunt to get it back.
I mapped the “SimToggleCursorCenter” hotkey to snap it back to the middle and the free it up again, but it is not very easy to do and kind of counter productive.Is there a way to have a key to snap it back to the middle and for the mouse to be “free” again right away ? Would your tool allow that ?
Thank you !
Flow.
Yes, this is still active. It merely has not been developed further. It functions by forcing the mouse to remain centered when the main toggle switch is ON in the application GUI. It operates off BMS Shared Memory, so when the target is Falcon BMS, centering will only happen when in the cockpit (not in the menus before flight).
If I wanted to center my mouse cursor simply to move it to center, I’d create a voice command for this in VoiceAttack because it is so extremely simple and also frees up this action to not have to be tied to some hotkey(s) or button(s).
I don’t know if you use VoiceAttack, or would be interested in voice controls, but if not, I would say that this app is not very smart, and would require a fair bit of refactoring to add a button/keypress monitor just for a function to center the mouse one time and release it - though it could be done. I would want such a system to be able to set any keyboard key or keys combo, DX controller button, or mouse button, and am presently deep in a different coding project (OpenAI VoiceAttack Plugin).
Let me know if you have any other utility software such as VoiceAttack, it would be much easier and faster for me to help you set something up in a program like that than refactor this app at this time. I can do it sometime in the future, but there is a BMS Server app project already next up after I’m finished with the OpenAI VoiceAttack plugin to be honest.
-
@SemlerPDX
Thanks for your answer.
So this mimics the new option of BMS as you confirm.
As for VoiceAttack, I bought it some time ago, used it for some time, and then gave up as it either did not understand me or I forgot the command. I am using a stream deck now which I much prefer. Maybe your OpenAI integration would solve that
I found an interesting plugin for the mouse for the Stream Deck. I’ll look into it and report back.Can’t wait for what you have in the works as it sounds really interesting.
Edit : Here is what I found for the stream deck : https://github.com/BarRaider/streamdeck-supermacro/wiki/Mouse-Commands
-
I’m not sure if this is the right place for this, but I was thinking about a possible improvement on keeping the mouse centered in VR.
Centering it all the time works pretty well in VR. I like being able to point at things by looking and using a HOTAS button for the mouse click. But my only problem with this setup is trying to reach the last switches all the way in the back of the cockpit. I can’t look over my shoulder far enough comfortably to look at the last switches.
I was wondering what it would be like if the mouse cursor would move towards the edge of your view while looking over your shoulder. So when looking ahead, the mouse would be centered in view. Then as you start looking towards the left, the mouse cursor moves the same relative amount in your view. So let’s say I’m looking halfway between dead ahead and the farthest I can look over my shoulder, then the mouse cursor would also be halfway between center view and the edge of my view.
Does that make sense? Would you guys think it would be a natural way of pointing at things, even all the way in the back of the cockpit?
-
@Ricky Well, it would be extremely difficult (if even possible) for the app to detect such things as where you are looking in VR.
That being said, it doesn’t mean we can’t consider some other kind of workaround. Perhaps there should be some way to temporarily disable the mouse centering so that users can access otherwise unreachable buttons. Alternatively, if the look movement has curves which can be adjusted, they could have increased movement at the edges to accomplish this feat.
Honestly, I was not sure that anyone was using this app as it was deprecated literally a day before it was released, as BMS included a native centering function for VR in the U1 update.
I’m happy to entertain ideas for improvement within the realm of possibilities for this app.
-
@SemlerPDX Yeah, it’s too bad about the timing of the app and U1.
What you describe about the curves should work perfectly. As you move your head, the mouse should move a bit more than your head. And then the curve could be set so that when your head is turned all the way, the mouse has just reached the edge of your view.
Can your program read how far a VR headset is turned from center? So something like 20 degrees to the left?
-
@Ricky My program can’t read which way you are looking in VR… period. Due to the nature of the app, it likely will never be able to. Best I may be able to do in future is introduce an override. Right now, you’d have to alt-tab to the app and left click the mouse, assuming you’d already used CTRL+(Any Arrow Key) to center the app toggle button under the center of the screen. Of course, repeating that same action to re-engage mouse centering. I was very much trying to avoid making this app into a keypress monitor as that is one step away from keypress logging and it is an open source app - though I’m an overly paranoid person and should eventually get over the fact that idiots can transform anything wonderful into something bad.
What I had meant about curves is to see if you can get your in-game head to turn more as you approach the edges of your physical neck turning range. This way, you CAN look at buttons out of view and accurately place the center of your gaze on them to use a mouse-click or wheel action.
-
@SemlerPDX Got it, thanks.
There’s a similar app called VR Neck Safer: https://gitlab.com/NobiWan/vrnecksafer
It allows you to temporarily increase your viewing angle with a HOTAS button. Although your idea of the curves might be more elegant.
-
@Ricky said in MouseMasterVR - Mouse functions utility app:
@SemlerPDX Got it, thanks.
There’s a similar app called VR Neck Safer: https://gitlab.com/NobiWan/vrnecksafer
It allows you to temporarily increase your viewing angle with a HOTAS button. Although your idea of the curves might be more elegant.
Interesting find! This solution of requiring two physical buttons is definitely not ideal. If you are familiar with TrackIR, this was the sort of thing I was describing - if BMS could implement anything along these lines or if SteamVR would allow for such things, it would be a lot more user-friendly. Even OpenTrack has something like this, afaik, and the whole point is that it is a custom curve, not something that you have to press buttons to achieve, it’s always on:
…and of course, there are options to select each axis from the drop-down box.MouseMasterVR will not ever have something like this, it is merely a mouse centering and rebinding app.