Spacemouse scrolling

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
PTakeOffServices
Posts: 2
Joined: Wed Dec 18, 2019 2:15 pm

Spacemouse scrolling

Post by PTakeOffServices »

Hello,
Looking for some help with what I think should probably be a pretty simple request. I use Oncenter software's Onscreen takeoff daily and have a SpaceMouse Pro Wireless that I can not seem to get to work correctly. All I need it to do is scroll left / right / up / down as well and zoom in and out. Currently I use the mouse scroll wheel for up and down and the shift + mouse scroll wheel for left and right. Zoom is CNTL + scroll wheel for in and out. I have the programmable buttons working for simple functions I would use like cut / paste etc.

If i could get some help on how the make this happen I would greatly appreciate it.
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Spacemouse scrolling

Post by jwick »

I assume there is no support in the app for the 3D mouse.
You can use the mouse emulation to do some things.

You would probably only want to use it with one DOF at a time, as I'm not sure how well the mad stomping on the ctrl and shift buttons will work.

You will need a cfg file that identifies the application and defines what to do with the axes.
It sounds like you have used the GUI to make changes already, so you should have a cfg file in your application in %appdata%/3dconnexion/3dxware/cfg dir.
Unfortunately the GUI can't help you with the Axes. You need to do that by editing the XML.

If you open the file, you should find a <Device> section for your SpaceMouse Pro Wireless.
In that section, you will need to add something like this.
I've mapped the three translation axes. You may want to rearrange them, or switch [some] to rotation axes. Putting zoom on the Rz axis is often a nice way to isolate it.

Code: Select all

    <Device>
	 <Name>SpaceMouse Pro Wireless</Name>
	 <ID>ID_ProductID_C631</ID>
         <AxisFilter>Dominant</AxisFilter>
         <CurrentAxisBank>Default</CurrentAxisBank>
         <CurrentButtonBank>Default</CurrentButtonBank>
	  
	  <AxisBank Default="true">
		<Name>Default</Name>
		<ID>Default</ID>

		<!-- Tx (left-right): hold Shift key down and send MouseWheel events  -->
		<Axis>
			<Enabled>true</Enabled>
			<Input>
				<ActionID>HIDMultiAxis_X</ActionID>
				<Min>-512</Min>
				<Max>511</Max>
				<Deadband>0</Deadband>
			</Input>
			<Output>
				<ActionID>HIDMouse_Wheel</ActionID>
				<NameID>STR_PAN_RIGHT_LEFT</NameID>
				<Min>-512.00</Min>
				<Max>511.00</Max>
				<Scale>0.75</Scale>
				<Reversed>false</Reversed>
				<Modifiers><Modifier>Shift</Modifier></Modifiers>
			</Output>
		</Axis>

		<!-- Ty (to-fro): send MouseWheel events  -->
		<Axis>
			<Enabled>true</Enabled>
			<Input>
				<ActionID>HIDMultiAxis_Y</ActionID>
				<Min>-512</Min>
				<Max>511</Max>
				<Deadband>0</Deadband>
			</Input>
			<Output>
				<ActionID>HIDMouse_Wheel</ActionID>
				<NameID>STR_ZOOM_IN_OUT</NameID>
				<Min>-512.00</Min>
				<Max>511.00</Max>
				<Scale>0.75</Scale>
				<Reversed>false</Reversed>
			</Output>
		</Axis>

		<!-- Tz (up-down): hold Control key down and send MouseWheel events  -->
		<Axis>
			<Enabled>false</Enabled>
			<Input>
				<ActionID>HIDMultiAxis_Z</ActionID>
				<Min>-512</Min>
				<Max>511</Max>
				<Deadband>0</Deadband>
			</Input>
			<Output>
				<ActionID>HIDMouse_Wheel</ActionID>
				<NameID>STR_PAN_UP_DOWN</NameID>
				<Min>-512.00</Min>
				<Max>511.00</Max>
				<Scale>0.75</Scale>
				<Reversed>false</Reversed>
				<Modifiers><Modifier>Control</Modifier></Modifiers>
			</Output>
		</Axis>
	   </AxisBank>
	   ...
	</Device>
PTakeOffServices
Posts: 2
Joined: Wed Dec 18, 2019 2:15 pm

Re: Spacemouse scrolling

Post by PTakeOffServices »

Thank you very much for working on this for me. Please bear with me as I'm by not stretch of the imagination a programmer.... I managed to copy your code into my xml config file, and It seems to work if I use it in conjunction with the keyboard. Is there a way to program it so I do not need to use the keyboard? Ie, I push up on the knob and it scrolls up, I push the knob to the right and it scrolls right etc. That way I keep working the mouse with the right hand and I control the flow of the plan sheets with my left hand, without having to input the keyboard.

I apologize if my initial question/request didn't fully explain what I'm trying to accomplish.

Thank you again for your help!
Post Reply