SpaceMouse 3d 3dConnexion: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
Created page with " = Configuration files = Where can I find my 3DxWare configuration files? For the Windows driver: User specific configuration files are stored in %APPDATA%\3Dconnexion\3DxWa..."
 
 
Line 37: Line 37:
There are some third party joystick configuration apps that look like they work very well if the game doesn't have the configuration capabilities you are looking for. The driver has some customizability, but these other apps are much more feature rich.
There are some third party joystick configuration apps that look like they work very well if the game doesn't have the configuration capabilities you are looking for. The driver has some customizability, but these other apps are much more feature rich.


== Assign keyboard shortcuts to rotation axis ==
[https://forum.3dconnexion.com/viewtopic.php?t=38192 Assign keyboard shortcuts to rotation axis]
The GUI can't help you with this, but if you can edit the cfg file for the app, here is one example of how you add two keys on an axis (positive and negative direction). I think these send A and S keys. You need to replace the <Key> values with the values for the keys you want to send. You can look them up online, but the easiest way is to create a kb macro with our GUI and see what value it saves in the cfg file.
<pre>
      <AxisBank Default="true">
        <Name>STR_DEFAULT_BANK</Name>
        <ID>Default</ID>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>0</Min>
            <Max>511</Max>
            <Deadband>200</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>8</Key>
            </KeyStroke>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>-512</Min>
            <Max>0</Max>
            <Deadband>200</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>14</Key>
            </KeyStroke>
          </Output>
        </Axis>
      </AxisBank>
</pre>
== Alt + left mouse button + mouse move ==
== Alt + left mouse button + mouse move ==
[https://forum.3dconnexion.com/viewtopic.php?f=25&t=39226&p=76213&hilit=media#p76213 keyboard, mouse and joystick emulation ?]
[https://forum.3dconnexion.com/viewtopic.php?f=25&t=39226&p=76213&hilit=media#p76213 keyboard, mouse and joystick emulation ?]

Latest revision as of 11:24, 23 September 2022

Configuration files

Where can I find my 3DxWare configuration files?

For the Windows driver:

User specific configuration files are stored in %APPDATA%\3Dconnexion\3DxWare\Cfg.

The configuration files have an extension of .XML

Normally, the variable %APPDATA% is expanded as follows: C:\Users\username\AppData\Roaming\

If you cannot locate the Application Data folder, you may have to enable “Show hidden files and folders” in Windows Explorer (Tools -> Folder Options -> View -> “Show hidden files and folders”).

Generically installed configuration files are stored in

C:\Program Files\3Dconnexion\3DxWare\3DxWinCore\Cfg

KeyboardTemplate.xml

KeyboardWASDTemplate.xml

JoystickTemplate.xml

Editing your XML

NB you may have to enable dominant function

how to create/ edit a config file

1) Create a cfg for the app so the driver knows it has to do something special for the app. The easiest way to do this is just to make some change in our GUI while your app is running. It will write a valid XML file for you to start with.

2) Change the cfg to tell the driver to send Joystick events. Edit the file in Step 1. Copy over the <ButtonActions> and <Devices> sections from our %ProgramFiles%/3dconnexion/3dxware/3DxWinCore/Cfg/JoystickTemplate.xml file.

At that point, when your game is running, the driver should use your file and send joystick events for the axes. You can then use the game's GUI to tell the game what to do with those joystick events.

There are some third party joystick configuration apps that look like they work very well if the game doesn't have the configuration capabilities you are looking for. The driver has some customizability, but these other apps are much more feature rich.

Assign keyboard shortcuts to rotation axis

Assign keyboard shortcuts to rotation axis

The GUI can't help you with this, but if you can edit the cfg file for the app, here is one example of how you add two keys on an axis (positive and negative direction). I think these send A and S keys. You need to replace the <Key> values with the values for the keys you want to send. You can look them up online, but the easiest way is to create a kb macro with our GUI and see what value it saves in the cfg file.

      <AxisBank Default="true">
        <Name>STR_DEFAULT_BANK</Name>
        <ID>Default</ID>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>0</Min>
            <Max>511</Max>
            <Deadband>200</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>8</Key>
            </KeyStroke>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>-512</Min>
            <Max>0</Max>
            <Deadband>200</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>14</Key>
            </KeyStroke>
          </Output>
        </Axis>
      </AxisBank>

Alt + left mouse button + mouse move

keyboard, mouse and joystick emulation ?

Is it possible to simulate via a custom XML an "Alt + Left Mouse Button + Mouse Move" action on an axis input?

 <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
            <Deadband>0</Deadband>
          </Input>
          <Output>
            <Modifiers>
              <Modifier>Alt</Modifier>
              <Modifier>LeftMouse</Modifier>
            </Modifiers>
            <Reversed>false</Reversed>
            <ActionID>HIDMouse_X</ActionID>
          </Output>
        </Axis>

This almost works as intended! I had to set the AxisFilter to Dominant, otherwise with slight mixing of rotation/panning while using the SpaceMouse it presses both mouse keys (LeftMouse for rotation, MiddleMouse for panning ) and starts behaving incorrectly.

SpaceMouse Joystick Emulator

SpaceMouse Joystick Emulator

It is true that all GUI support for joystick emulation was removed. AFAIK, the functionality still works if you configure it yourself.

You have to create/edit a cfg file for your game.

If you make some configuration change (like change the scaling or filtering) using the device or GUI while your game is running, the driver will create a KMJ (Keyboard, Mouse, Joystick) cfg for you. You then have to edit the settings manually because it doesn't have much assigned to the axes. You might already have such a file in your %appdata% directory.

Look at the JoystickTemplate.xml cfg that we ship. You want to assign your device axes in a similar way (<Output/ActionID>>HIDJoystick_X etc).

When your game is running, hovering over the 3Dx icon in the systray should show your filename in use.

Even so, this just gives you basic support of the joystick. The SN2vJoy program mentioned does seem to have a much more substantial interface and range of settings.


The first two things to try when setting up a cfg is to turn on the dominant filter and the log file. The log file will tell you what joystick/keyboard/mouse events are being sent out. The dominant filter (in the GUI) will only send one axis at a time, so you can see better what is going on. When too many inputs get sent simultaneously it often confuses applications.

Some of our devices have an automatic calibrate in the firmware, especially wireless devices. If you hold a constant value for too long, it will think the device is falsely drifting and will recalibrate itself. When you release the cap, the springs will return the device to the mechanical center and it will think you are pushing the opposite direction. Then it will auto-calibrate itself again later.

You can run the joystick control panel to test the device. Save this cfg file into the ProgramFiles...3DxWinCore64/Cfg/JoystickTestProgram.xml. Then run joy.cpl.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
(c) Copyright 3Dconnexion. All rights reserved. 
$Revision: 12569 $
-->
<AppCfg Default="true" xmlns="" CfgFormatVersion="1.2" ThisFileVersion="1.1">
  <AppInfo>
    <Signature>
      <Name>STR_JOYSTICK_TEST_PROGRAM</Name>
      <ExecutableName>RUNDLL32.EXE</ExecutableName>
      <VersionRange>
        <Min>1.0.0.0</Min>
        <Max>1.0.0.0</Max>
      </VersionRange>
      <Transport>KMJ</Transport>
      <WindowCaption SubStringLocation="StartsWith">3Dconnexion KMJ Emulator properties</WindowCaption>
    </Signature>
    <Options>
      <IgnoreMouseWheelInertia>true</IgnoreMouseWheelInertia>
    </Options>
  </AppInfo>
  <ButtonActions>
    <!-- App Handled Actions -->
    <ButtonAction Type="App">
      <ID>App_ResetYourView</ID>
      <Name>STR_APP_RESETYOURVIEW</Name>
    </ButtonAction>
    <!-- Keyboard Functions -->
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_1</ID>
      <Name>STR_JOYSTICK_1</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_2</ID>
      <Name>STR_JOYSTICK_2</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_3</ID>
      <Name>STR_JOYSTICK_3</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_4</ID>
      <Name>STR_JOYSTICK_4</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_Hat_N</ID>
      <Name>STR_JOYSTICK_HAT_N</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_Hat_E</ID>
      <Name>STR_JOYSTICK_HAT_E</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_Hat_S</ID>
      <Name>STR_JOYSTICK_HAT_S</Name>
    </ButtonAction>
    <ButtonAction Type="Joystick">
      <ID>HIDJoystick_Hat_W</ID>
      <Name>STR_JOYSTICK_HAT_W</Name>
    </ButtonAction>
  </ButtonActions>
  <Devices>
    <Device>
      <Name>Standard 3D Mouse</Name>
      <VendorID>0</VendorID>
      <ProductID>0</ProductID>
      <AxisFilter>None</AxisFilter>
      <CurrentButtonBank>Default</CurrentButtonBank>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_X</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_X</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Y</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Y</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Z</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Z</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rx</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Rx</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Ry</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Ry</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rz</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
        </Input>
        <Output>
          <ActionID>HIDJoystick_Rz</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDUnspecified</ActionID>
        </Input>
        <Output>
          <ActionID>HIDUnspecified</ActionID>
        </Output>
      </Axis>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>V3DK_MENU</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_ShowDriverGUI</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_FIT</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_ShowDriverGUI</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_TOP</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_Hat_N</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_LEFT</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_Hat_W</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_RIGHT</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_Hat_E</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_FRONT</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_Hat_S</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_1</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_Toggle_3DxNumPad</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_2</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_2</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_3</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_3</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_4</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_4</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_ESC</ActionID>
          </Input>
          <Output>
            <ActionID>KB_Esc</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_ALT</ActionID>
          </Input>
          <Output>
            <ActionID>KB_Alt</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_SHIFT</ActionID>
          </Input>
          <Output>
            <ActionID>KB_Shift</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_CTRL</ActionID>
          </Input>
          <Output>
            <ActionID>KB_Ctrl</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_ROTATE</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_ToggleTranslations</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_DOMINANT</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_ToggleDominantFilter</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_PLUS</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_IncreaseAppScale</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_MINUS</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_DecreaseAppScale</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>V3DK_USER</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_ToggleRotations</ActionID>
          </Output>
        </Button>
      </ButtonBank>
    </Device>
    <Device>
      <Name>SpaceMouse Wireless</Name>
      <VendorID>256f</VendorID>
      <ProductID>c62e</ProductID>
      <CurrentButtonBank>Default</CurrentButtonBank>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>HIDButton_1</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_1</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>HIDButton_2</ActionID>
          </Input>
          <Output>
            <ActionID>HIDJoystick_2</ActionID>
          </Output>
        </Button>
      </ButtonBank>
    </Device>
  </Devices>
</AppCfg>

3rd party remappers

Universal Control Remapper

Universal Control Remapper is a Windows application which allows the end-user to remap any inputs from devices, such as keyboards, mice, joysticks, racing wheels, eye trackers, etc. to virtual output devices. Remapping is achieved by transforming inputs through plugins to a desired output device.

ControlMyJoystick

Send command to your game as joystick, keyboard and mouse input using our virtual device drivers.

ControlMyJoystick - TheSpaceNavigator