Page 1 of 1

Multi-button mouse support

Posted: Tue Dec 11, 2012 8:57 am
by logicalChimp
Hi

I notice that in the current version, the 'mouse' object can only address three buttons (or at least, only three buttons come up on the auto-complete).

Would it be possible to add support for mice with more buttons (at the extreme end, mice like that Razor one with the 12 buttons on the side, etc). I'm thinking more from a perspective of being able to read the buttons in FreePIE, not write state to them. I don't have any special drivers installed in windows, but games can still detect that I have multiple buttons, so hopefully it won't be too hard... (famous last words from the non-dev :D)

For my particular intentions, I want to be able to use the side button on my mouse (which is either button 4 or 5) to enable/disable functions in my FreePIE script. Specifically, when using the HMD with tracker in windows, I need an obvious/easy to hit button to enable/disable the tracker (e.g. for drift correction, or nipping to the loo :D), and the big button on the side of the mouse seems best (and i'm less likely to hit it be accident whilst typing)

Thinking further forward, I could see benefit in mapping e.g. glove sensors per-finger to individual mouse buttons, or similar. But I don't need that, so read access will do for me :D

Ta

Re: Multi-button mouse support

Posted: Tue Dec 11, 2012 9:36 am
by CyberVillain
logicalChimp wrote:Hi

I notice that in the current version, the 'mouse' object can only address three buttons (or at least, only three buttons come up on the auto-complete).

Would it be possible to add support for mice with more buttons (at the extreme end, mice like that Razor one with the 12 buttons on the side, etc). I'm thinking more from a perspective of being able to read the buttons in FreePIE, not write state to them. I don't have any special drivers installed in windows, but games can still detect that I have multiple buttons, so hopefully it won't be too hard... (famous last words from the non-dev :D)

For my particular intentions, I want to be able to use the side button on my mouse (which is either button 4 or 5) to enable/disable functions in my FreePIE script. Specifically, when using the HMD with tracker in windows, I need an obvious/easy to hit button to enable/disable the tracker (e.g. for drift correction, or nipping to the loo :D), and the big button on the side of the mouse seems best (and i'm less likely to hit it be accident whilst typing)

Thinking further forward, I could see benefit in mapping e.g. glove sensors per-finger to individual mouse buttons, or similar. But I don't need that, so read access will do for me :D

Ta
Yeah, I've been thinking about this too, can check it out later tonight. My idea is to keep the code as is and add a more generic function for reading arbitrary buttons. That way old scripts will work and new scripts can take advantage of the new way

Re: Multi-button mouse support

Posted: Tue Dec 11, 2012 3:13 pm
by CyberVillain
Fixed, but we have some coming fixes that i want in the next release like TrackIR etc, so wont update MSI, but use this plugin dll and you're set

Re: Multi-button mouse support

Posted: Tue Dec 11, 2012 4:50 pm
by logicalChimp
Awesome stuff - downloaded and tested, works great :)

Many thanks

Re: Multi-button mouse support

Posted: Wed Dec 12, 2012 1:57 am
by CyberVillain
logicalChimp wrote:Awesome stuff - downloaded and tested, works great :)

Many thanks
Nice!