Everything to control the driver is determined by entries in human-readable XML files. If you make a valid change in a file, it will be used. Our GUI just makes changes to XML files. You can do that yourself. If you make an XML syntax error, the file will be discarded (moved to a bak dir). Don't worry about experimenting. You can't break anything that can't be fixed by deleting some files.
There are two aspects of the files that were being sent out that are significant.
1) Current (last year or so) driver releases have the ability to globally grab controls on a device. That is, no matter which application is in focus, the device control will do the same thing. For this usage, a device button can be assigned to always switch between 2D and 3D modes.
2) We ship a cfg file "Desktop.xml", that is traditionally used to define 2D mouse operations. The global assignment mentioned above switches to and from this cfg file. It could contain 2D mouse assignments, but it does not by default. You can add these assignments to your user changes (stored in %appdata%\3Dconnexionn\3DxWare\Cfg\Desktop.xml).
The GUI (3Dconnexion Settings, 3DxSmartUI.exe)
The global assignment is not shown correctly in the GUI. The GUI will show the wrong assignment; the one that changes with the application.
OTOH, once switched to an "alternate cfg", the GUI can be used to make changes. In this case, you can make changes to Desktop.xml and they will be used when switched to Desktop.xml. E.g., you could assign mouse buttons, kb shortcuts, executable launches, etc. that are now available at the press of a button no matter which application you are in.
The use is as such:
A) Use the 3D device as a 3D device in a 3Dmouse-aware application.
B) Press this 2D/3D button to switch to 2D mode. The 3D device cap now controls the cursor position and the device buttons do whatever you have assigned. E.g., you can use it to move over to another window and press a button assigned to the LeftMouseButton to click focus into that window.
C) Press the 2D/3D button to switch back to 3D mode.
Caveat emptor, it doesn't make a great 2D mouse, too much acceleration IMO. I could probably improve that...
The changes.
For #1, you need to add these lines in your %appdata%\3Dconnexion\3DxWare\Cfg\Global.xml file. You should have one of those if you ever ran the driver.
Code: Select all
<ButtonActions>
<ButtonAction Type="Driver_Other">
<ID>Driver_Desktop_ToggleGrab</ID>
<Name>STR_DRIVER_DESKTOP_TOGGLEGRAB</Name>
<Image>
<Source>[driver_images:Driver_Desktop_ToggleGrab.png]</Source>
</Image>
</ButtonAction>
</ButtonActions>
This adds a ButtonAction that switches between 2D and 3D modes.
After this add:
Code: Select all
<Devices>
<Device>
<ID>ID_Standard_3D_Mouse</ID>
<ButtonBank Global="true">
<ID>Global Global</ID>
<Name>Global</Name>
<Button>
<Input>
<ActionID>V3DK_MENU_2</ActionID>
</Input>
<Output>
<ActionID>Driver_Desktop_ToggleGrab</ActionID>
</Output>
</Button>
</ButtonBank>
</Device>
</Devices>
This assigns the 2D/3D ButtonAction to the generic V3DK_MENU_2 button on every 3D mouse. That button exists on all 2 button devices. If you want to assign it to a different button on a different device you need the correct ID. This can be found in a file we ship at %ProgramFiles%\3Dconnexion\3DxWare\3DxWinCore\cfg\Base.xml.
E.g., for button "1" on a SpaceMouse Pro, you will find
Code: Select all
<Device>
<ID>ID_ProductID_C62B</ID>
<Name>SpaceMouse Pro</Name>
...
<ButtonID>HIDButton_13</ButtonID>
<V3DKID>V3DK_1</V3DKID>
<ParentID>V3DK_1</ParentID>
Put V3DK_1 in Button/Input/ActionID instead of V3DK_MENU_2. That would make the "1" button on your SMP into a 2D/3D toggle button. But only you know that.
For #2, you need changes to your user Desktop.xml. You probably don't have one of those. Save this into %appdata%\3Dconnexion\3DxWare\Cfg\Desktop.xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<AppCfg Default="false" xmlns="" CfgFormatVersion="1.3" ThisFileVersion="1.10">
<AppInfo>
<Signature>
<Name>STR_DESKTOP</Name>
</Signature>
<Options/>
</AppInfo>
<CfgProperties>
<ID>ID_Desktop_Cfg</ID>
<Name>STR_DESKTOP</Name>
<InheritsFromID>ID_Desktop_Cfg</InheritsFromID>
<Grab>None</Grab>
</CfgProperties>
<AuthorInfo>
<DriverVersion>17.8.2.18778</DriverVersion>
<LastChange>
<Tool>3DxService.exe</Tool>
<Version>17.8.2.18778</Version>
<Date>2021:10:4:7:6:15:49:69</Date>
<User>jwick</User>
</LastChange>
<Created>
<Tool>3DxService.exe</Tool>
<Version>17.8.2.18778</Version>
<Date>2021:10:4:7:6:5:17:234</Date>
<User>jwick</User>
</Created>
</AuthorInfo>
<Devices>
<Device>
<ID>ID_Standard_3D_Mouse</ID>
<AxisBank Default="true">
<Name>STR_DEFAULT_BANK</Name>
<ID>Default</ID>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Rx</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDMouse_Y</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Ry</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDMouse_X</ActionID>
<Reversed>true</Reversed>
</Output>
</Axis>
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>HIDMultiAxis_Rz</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDMouse_Wheel</ActionID>
</Output>
</Axis>
</AxisBank>
<ButtonBank Default="true">
<Name>STR_DEFAULT_BUTTONBANK</Name>
<ID>Default</ID>
<InheritsFromID/>
<Button>
<Input>
<ActionID>V3DK_MENU_1</ActionID>
</Input>
<Output>
<ActionID>HIDMouse_Left</ActionID>
</Output>
</Button>
</ButtonBank>
</Device>
</Devices>
</AppCfg>
The Rz axis (like opening a jar) is assigned to the MouseWheel. Using quite a separate axis, we think, makes it easier to do this action w/o accidentally invoking one of the other axes. With a real 2D mouse, it is a different physical control, so you don't have this problem.
The V3DK_MENU_1 button is assigned to the LeftMouseButton. IIRC, this was the original request from the OP. This user requested using a SpaceMouse Wireless as a 2D mouse with left button working as a LMB and the right button switching between 2D/3D modes. It is very limiting having only two buttons. If you have different buttons, as above, you can switch this assignment to a different button. E.g., the Alt button to the left of the cap on the SMP.
Hopefully that gets you going. I expect this syntax to remain valid for the foreseeable future. But as with all changes made without the GUIs help, these things are untested and officially unsupported. It may break. OTOH, I would be very happy to hear from you if it breaks, so I can fix it!!
There's a distinct possibility that I have made an error here. I'll fix this post to fix it or add more info as needed.