SpaceExplorer USB axis mapping problem

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
mstp
Posts: 4
Joined: Thu Apr 28, 2022 10:25 am

SpaceExplorer USB axis mapping problem

Post by mstp »

I've made custom XML and since buttons are working fine mapping WASD keys to axis won't. There is absolutelly no reaction.
I'm running Win 10 Pro 21H1 19043.1526, 3DxWare 10.6.4, 3DxWinCore 17.6.4.16911, SpaceExplorer FW 4.04.
XML placed in %APPDATA%.

The code is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!--
(c) Copyright 3Dconnexion. All rights reserved. 
$Revision: 12637 $
-->
<AppCfg Default="true" xmlns="" CfgFormatVersion="1.2" ThisFileVersion="1.3">

<Settings>
		<ResponseCurve>1.00</ResponseCurve>
		<!--<OverallScale>0.68</OverallScale>-->
	</Settings>
	
	<CfgProperties>
		<ID>ID_cod2mp_s</ID>
		<Name>STR_cod2mp_s</Name>
		<InheritsFromID>ID_Base_Cfg</InheritsFromID>
		<Access />
	</CfgProperties>
  
<AppInfo>
    
  <Name>STR_cod2mp_s</Name>
  <ExecutableName>cod2mp_s.EXE</ExecutableName>
  <Grab>None</Grab>
  <Transport>KMJ</Transport>
	  
</AppInfo>
 

  
<Devices>
<Device>
 <Name>SpaceExplorer</Name>
 <VendorID>46d</VendorID>
 <ProductID>c627</ProductID>
 <InheritsFrom>Standard 3D Mouse</InheritsFrom>
 <AxisFilter>None</AxisFilter>
 <CurrentAxisBank>Default</CurrentAxisBank>
 <CurrentButtonBank>Default</CurrentButtonBank>
			
			
<AxisBank Default="true">
    <ID>Default</ID>
	<Name>STR_DEFAULT_BANK</Name>
	
	
	<!--back-->
	
      <Axis>
      <Enabled>True</Enabled>
      
	  <Input>
      <ActionID>HIDMultiAxis_Y</ActionID>
      <Min>0</Min>
      <Max>511</Max>
      <Deadband>200</Deadband>
      </Input>
      
	  <Output>
      <ActionID>KB_Keystroke</ActionID>
      <RepeatStyle>PressAndHold</RepeatStyle>
      <Keystroke>
      <Key>16</Key>
      </Keystroke>
      </Output>
      </Axis>
	  
	
	<!--forward-->
	
      <Axis>
      <Enabled>True</Enabled>
      
	  <Input>
      <ActionID>HIDMultiAxis_Y</ActionID>
      <Min>-512</Min>
      <Max>0</Max>
     
      </Input>
      
	  <Output>
      <ActionID>KB_Keystroke</ActionID>
      <RepeatStyle>PressAndHold</RepeatStyle>
      <Keystroke>
      <Key>1A</Key>
      </Keystroke>
      </Output>
      </Axis>
	  
	  
	  <!--crouch-->
	  
      <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>6</Key>
      </Keystroke>
      </Output>
      </Axis>
	 
	  
	  
      <Axis>
      <Enabled>False</Enabled>
      <Input>
      <ActionID>HIDMultiAxis_Rx</ActionID>
      <Min>-512</Min>
      <Max>511</Max>
      </Input>
      <Output>
      <ActionID>HIDMultiAxis_Rx</ActionID>
      </Output>
      </Axis>
	  
	  
	  <!--left-->
	  
      <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>4</Key>
      </Keystroke>
      </Output>
      </Axis>
	  
      
	  <!--right-->
	  
	  <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>7</Key>
      </Keystroke>
      </Output>
      </Axis>
      
	  
	  <Axis>
      <Enabled>False</Enabled>
      
	  <Input>
      <ActionID>HIDMultiAxis_X</ActionID>
      <Min>-512</Min>
      <Max>511</Max>
      </Input>
      
	  <Output>
      <ActionID>HIDMultiAxis_X</ActionID>
      </Output>
      </Axis>
      
	  <Axis>
      <Enabled>False</Enabled>
      
	  <Input>
      <ActionID>HIDMultiAxis_Ry</ActionID>
      <Min>-512</Min>
      <Max>511</Max>
      </Input>
      
	  <Output>
      <ActionID>HIDMultiAxis_Rx</ActionID>
      </Output>
      </Axis>
	  
	  </AxisBank>
	  
	  
	  
	  
<ButtonBank Default="true">
	<Name>STR_DEFAULT_BUTTONBANK</Name>
	<ID>Default</ID>
        
		
    <Button>
	<Input>
    <ActionID>HIDButton_11</ActionID>
    </Input>
	<Output>
    <ActionID>KB_Space</ActionID>
    </Output>
	</Button>
	
	
    <Button>
	<Input>
    <ActionID>HIDButton_4</ActionID>
    </Input>
	<Output>
    <ActionID>KB_F2</ActionID>
    </Output>
    </Button>
	
	
    <Button>
    <Input>
    <ActionID>HIDButton_6</ActionID>
    </Input>
    <Output>
    <ActionID>KB_F4</ActionID>
    </Output>
    </Button>
	
	
    <Button>
    <Input>
    <ActionID>HIDButton_5</ActionID>
    </Input>
    <Output>
    <ActionID>KB_F1</ActionID>
    </Output>
    </Button>
	
	
    <Button>
    <Input>
    <ActionID>HIDButton_3</ActionID>
    </Input>
    <Output>
    <ActionID>KB_F3</ActionID>
    </Output>
    </Button>
	
	
	
    </ButtonBank>
	
	
  </Device>
</Devices>
  
</AppCfg>
Please tell me what I'm doing wrong - jog ist working fine f.e. in Solidworks.
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceExplorer USB axis mapping problem

Post by jwick »

Sorry for making you edit XML. It was not meant to be supported this way...

There are a few things wrong with the file.

1) if you are going to put it in %appdata%, the <AppCfg> line should have default="false" not default="true"

2) XML is quite case sensitive. I try to handle some mixed case, but if XML is doing the handling the case is important.
Change the <Enabled>True</Enabled> to <Enabled>true</Enabled> (and False to false)
Change the <Keystroke> element names to <KeyStroke> (while admitting that I write KB_Keystroke differently)
mstp
Posts: 4
Joined: Thu Apr 28, 2022 10:25 am

Re: SpaceExplorer USB axis mapping problem

Post by mstp »

Changes made - no luck, something is still missing/wrong. It looks like any KeyStroke is not responding no matter if it is a button or axis. I've made a small experiment - mapped some HIDButton with KeyStroke and it is too not working ( only working are function keys F1-F10 mapped as KB_F1 etc. and KB_Space ). Then I'v made a macro using settings window and this is overwriting an XML in appdata like that:

Code: Select all

<MacroTable>
    <MacroEntry>
      <ID>m</ID>
      <KeyStroke>
        <Key>10</Key>
      </KeyStroke>
	  
    </MacroEntry>
  </MacroTable>
  
  <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>HIDButton_3</ActionID>
          </Input>
          <Output>
            <ActionID>m</ActionID>
          </Output>
        </Button>
      </ButtonBank>
  
  
  
and suddenly KeyStroke is working!

Tried the same with mapping axis using ActionID like that:

Code: Select all

<MacroTable>
    <ID>forward</ID>
      <KeyStroke>
        <Key>1A</Key>
      </KeyStroke>
	  
    </MacroEntry>
  </MacroTable>
  
  <Axis>
      <Enabled>true</Enabled>
      
	  <Input>
      <ActionID>HIDMultiAxis_Y</ActionID>
      <Min>-512</Min>
      <Max>0</Max>
     
      </Input>
      
	  <Output>
      
            <ActionID>forward</ActionID>
          
      </Output>
      </Axis>
  
  
but this obviously is not working...

So my obseravtion is that any KeyStroke is working only when added as macro using settings window but since it is not possible for axis I'm stuck here...

My thought is that using settings window triggers/writes something somewhere else besides XML file in appdata...
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceExplorer USB axis mapping problem

Post by jwick »

You can't have macros on axes.
Creating the macros for a button with the GUI is useful. It shows you the Key codes you need to use for your keyboard.

There was nothing basically wrong with the first file. Just some syntax errors.
Let me know if your registered email is accurate and I can send you a fixed file.
mstp
Posts: 4
Joined: Thu Apr 28, 2022 10:25 am

Re: SpaceExplorer USB axis mapping problem

Post by mstp »

Registered mail is fine, please send the file and we will see.
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: SpaceExplorer USB axis mapping problem

Post by jwick »

File sent
mstp
Posts: 4
Joined: Thu Apr 28, 2022 10:25 am

Re: SpaceExplorer USB axis mapping problem

Post by mstp »

Thank you very much - everything is working just like I wanted it!
Now I need to carefully anaylize your XML and find out what was wrong with my XML.
Post Reply