SpaceNavigator for Steam games?

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
KeirKieran
Posts: 4
Joined: Sat Apr 11, 2015 8:35 am

SpaceNavigator for Steam games?

Post by KeirKieran »

Hi, I'm trying to make an .xml from the KeyboardWASDTemplate to use with a Steam game. Everything works when it's connected to notepad, but when I point it to the game exe I get nothing. Any idea? Is this a problem specific to Steam games? When I'm in the game, 3Dconnexion Properties shows the program name, so it's detecting the game, but it's not running the cfg file.

Code: Select all

<?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" xml:space="preserve">
  <AppInfo>
    <Signature>
      <Name>STR_2_KEYBOARD_WASD</Name>
      <ExecutableName>Stardew Valley.exe</ExecutableName>
      <VersionRange>
        <Min>1.0</Min>
        <Max>1.0</Max>
      </VersionRange>
      <Transport>KMJ</Transport>
    </Signature>
  </AppInfo>
  <Devices>
    <Device>
      <Name>SpaceNavigator</Name>
       <VendorID>46d</VendorID>
      <ProductID>c626</ProductID>
      <AxisFilter>None</AxisFilter>
      <CurrentButtonBank>Default</CurrentButtonBank>
      <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>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Y</ActionID>
          <Min>0</Min>
          <Max>511</Max>
          <Deadband>100</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>PressAndHold</RepeatStyle>
          <KeyStroke>
            <Key>16</Key>
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Y</ActionID>
          <Min>-512</Min>
          <Max>0</Max>
          <Deadband>100</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>PressAndHold</RepeatStyle>
          <KeyStroke>
            <Key>1A</Key>
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Z</ActionID>
          <Min>0</Min>
          <Max>511</Max>
          <Deadband>200</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>PressAndHold</RepeatStyle>
          <KeyStroke>
            <Key>1B</Key>
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Z</ActionID>
          <Min>-512</Min>
          <Max>0</Max>
          <Deadband>200</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>PressAndHold</RepeatStyle>
          <KeyStroke>
            <Key>2C</Key>
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>false</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rx</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
          <Deadband>0</Deadband>
        </Input>
        <Output>
          <ActionID>HIDMultiAxis_Rx</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>false</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Ry</ActionID>
          <Min>-512</Min>
          <Max>511</Max>
          <Deadband>0</Deadband>
        </Input>
        <Output>
          <ActionID>HIDMultiAxis_Ry</ActionID>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rz</ActionID>
          <Min>0</Min>
          <Max>511</Max>
          <Deadband>200</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>PressAndHold</RepeatStyle>
          <KeyStroke>
            <Key>7</Key>
          </KeyStroke>
        </Output>
      </Axis>
      <Axis>
        <Enabled>true</Enabled>
        <Input>
          <ActionID>HIDMultiAxis_Rz</ActionID>
          <Min>-512</Min>
          <Max>0</Max>
          <Deadband>200</Deadband>
        </Input>
        <Output>
          <ActionID>KB_Keystroke</ActionID>
          <RepeatStyle>PressAndHold</RepeatStyle>
          <KeyStroke>
            <Key>4</Key>
          </KeyStroke>
        </Output>
      </Axis>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>V3DK_1</ActionID>
          </Input>
          <Output>
            <ActionID>Driver_Toggle_3DxNumPad</ActionID>
          </Output>
        </Button>
      </ButtonBank>
    </Device>
  </Devices>
</AppCfg>
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceNavigator for Steam games?

Post by jwick »

Does the driver list your cfg file when hovering over the 3Dx systray icon while your game is in focus?
Turning on the log file will give you a lot of information about how the cfg files are chosen for the application.
This is done in the 3Dx systray icon menu.
The file is %localappdata%/3Dconnexion/3DxWare/3DxService.log.

We had some very good luck with joystick emulation with Steam games (played Portal a lot) when we first wrote this driver.
Forum user Hypersonic reconfigured the game cfg a bit to make it work, but it was almost as good as native support.
KeirKieran
Posts: 4
Joined: Sat Apr 11, 2015 8:35 am

Re: SpaceNavigator for Steam games?

Post by KeirKieran »

I checked the systray icon and it was loading a Stardew Valley.xml that I didn't know existed. I found it in my appdata and dropped my code into it, which solved the problem.

Now my problem is changing how the keys work (its not a good arrangement for this game), but that's just a matter of me learning how this code works.

Thanks a lot for the advice.
KeirKieran
Posts: 4
Joined: Sat Apr 11, 2015 8:35 am

Re: SpaceNavigator for Steam games?

Post by KeirKieran »

And I have it! I don't get how the "keys" are numbered (7 is D, 16 is W), but it wasn't hard to get things assigned the way I wanted by elimination.

Thanks again.
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceNavigator for Steam games?

Post by jwick »

The key numbers are the HID key codes. You can look them up in the HID usage tables, but it is far easier to just make a keyboard macro in our GUI and see what key number it saves. E.g., make a keyboard macro by pressing the S key and see what it writes for that button. That's the same number you would use for an axis. It is somewhat dependent on your keyboard so it is useful to just record it from your keyboard.

But if you can get the joystick to work, you will be way happier.
Post Reply