I know this is possible

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
muddiman
Posts: 37
Joined: Sat Mar 17, 2007 6:01 am
Location: Lake City, FL
Contact:

I know this is possible

Post by muddiman »

I have been using RBC9’s driver and RBC9Nav configuration software since it's conception in 2010. In fact, I built a custom Space Navigator controller I’m still using today for gaming because of his driver. It’s still functional with Windows 10 as long as you are using test mode to use his drivers. I mainly play COD series, and it works great, but some of the newer games will not execute because of running Windows 10 in test mode. Because of this, I realized it’s finally time to put RBC9’s driver to rest. I tried ControlMyJoystick and could not get the results I desired. After doing some XML programming, I realized this appears to be possible. I have my desired configuration working with one exception in the Z-AXIS. In the game, when I want to go to crouch/prone position (Set to go to crouch in the game using the C key), I move the puck in the positive Z-AXIS direction using HIDMultiAxis_Z with a minimum of 0 and a maximum of 350 using PressAndHold. To go to prone (Set to go to prone in the game using Ctrl key), I continue down the same AXIS in the positive direction, starting with a minimum of 360 and a maximum of 512 using PressAndHold. Going into the prone position works about 40% of the time. The problem I have is most of the time the C key rebounds when I release from prone.
This is called Slicing, allowing the ability to have different key presses during the same AXIS direction depending on the AXIS position. I have included the notepad XML code that uses the Shift key instead of the Ctrl key to test my results. I believe the PressAndHold command is the issue, but there may be other programming options and mistakes I don’t know about. XML language is a hell of a lot easier than 6502 assembly programming, yeah, I’m that old. :-)


RBC9 SpaceNav driver https://forum.3dconnexion.com/viewtopic ... &start=735
Image

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="AppDefCfgDAM.xml"?>
<?xml-stylesheet type="text/css" href="../../../../../Documents/3DConnection%20CFG/MODS/APPCFG-Test.xml"?>
<AppCfg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Default="false" CfgFormatVersion="1.3" ThisFileVersion="2.0">
  <AppInfo>
    <Signature>
      <Name>Notepad MOD1</Name>
      <ExecutableName>notepad.exe</ExecutableName>
    </Signature>
    <Options/>
  </AppInfo>
  <CfgProperties>
    <ID>ID_NotePad</ID>
    <Name>NotePad</Name>
    <Transport>DirectInput</Transport>
    <InheritsFrom/>
  </CfgProperties>
  <MacroTable>
    <MacroEntry>
      <ID>V</ID>
      <KeyStroke>
        <Key>19</Key>
      </KeyStroke>
    </MacroEntry>
    <MacroEntry>
      <ID>3</ID>
      <KeyStroke>
        <Key>20</Key>
      </KeyStroke>
    </MacroEntry>
  </MacroTable>
  <ButtonActions>
    <ButtonAction Type="Sequence">
      <ID>Macro_88bdf08f-9f69-491a-b93d-91e084baa394</ID>
      <Name>one</Name>
      <Sequence Pause="120">
        <ActionID Pause="40">1</ActionID>
      </Sequence>
    </ButtonAction>
  </ButtonActions>
  <AuthorInfo>
    <DriverVersion>17.8.21.20975</DriverVersion>
    <LastChange>
      <Tool>3DxSmartUI.exe</Tool>
      <Version>1.2.24172.20954</Version>
      <Date>6/27/2024 8:23:59 PM UTC</Date>
      <User>A63BEB9F-31D8-4AC8-862B-01DE272E1152</User>
    </LastChange>
  </AuthorInfo>
  <Devices>
    <Device>
      <ID>ID_ProductID_C626</ID>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>HIDButton_1</ActionID>
          </Input>
          <Output>
            <!--Bottom Button--><ActionID>V</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>HIDButton_2</ActionID>
          </Input>
          <Output>
            <!--Top Button--><ActionID>3</ActionID>
          </Output>
        </Button>
      </ButtonBank>
    </Device>
    <Device>
      <ID>ID_Standard_3D_Mouse</ID>
      <AxisBank Default="true">
        <ID>Default</ID>
        <Name>STR_DEFAULT_BANK</Name>
        <Axis><!--Start AXIS X POS-->
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>0</Min>
            <Max>511</Max>
            <Deadband>128</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>07</Key><!--KB D(07) Slide Right-->
            </KeyStroke>
          </Output>
        </Axis><!--End AXIS X POS-->
        <Axis><!--Start AXIS X NEG-->
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>-512</Min>
            <Max>0</Max>
            <Deadband>128</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>04</Key><!--KB A(04) Slide Left-->
            </KeyStroke>
          </Output>
        </Axis><!--End AXIS X NEG-->
        <Axis><!--Start AXIS Y POS-->
          <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><!--KB S (16) AFT-->
            </KeyStroke>
          </Output>
        </Axis><!--End AXIS Y POS-->
        <Axis><!--Start AXIS Y NEG Walk-->
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Y</ActionID>
            <Min>-350</Min>
            <Max>0</Max>
            <Deadband>128</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>1A</Key><!--KB W(1A) Forward-->
            </KeyStroke>
          </Output>
        </Axis><!--END AXIS Y NEG Walk-->
        <Axis><!--Start AXIS Y NEG RUN-->
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Y</ActionID>
            <Min>-512</Min>
            <Max>360</Max>
            <Deadband>0</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <Modifiers>
              <Modifier>Shift</Modifier>
            </Modifiers>
            <KeyStroke>
              <Key>1A</Key>
            </KeyStroke>
          </Output>
        </Axis><!--END AXIS Y NEG RUN-->
      <Axis><!--Start AXIS Z POS (Crouch) Ends at 350 -->
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Z</ActionID>
            <Min>0</Min>
            <Max>350</Max>
            <Deadband>200</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <KeyStroke>
              <Key>06</Key><!--KB C (06) Crouch-->
            </KeyStroke>
          </Output>
        </Axis><!--End AXIS Z POS-->
        <Axis><!--Start AXIS Z POS Prone_ I cannot get Prone to work for the same Z AXIS starting at 360-->
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Z</ActionID>
            <Min>360</Min>
            <Max>512</Max>
            <Deadband>0</Deadband>
          </Input>
          <Output>
            <ActionID>KB_Keystroke</ActionID>
            <RepeatStyle>PressAndHold</RepeatStyle>
            <Modifiers>
              <Modifier>Shift</Modifier>
            </Modifiers>
            <KeyStroke>
              <Key>13</Key>
            </KeyStroke>
          </Output>
        </Axis><!--END AXIS Z POS Prone-->
        <Axis><!--Start AXIS Z NEG (Jump)-->
          <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><!--KB Space (2C) Jump-->
            </KeyStroke>
          </Output>
        </Axis><!--End AXIS Z NEG-->
        </AxisBank>
    </Device>
  </Devices>
</AppCfg>
notepad Mod-1.xml
Displaying notepad Mod-1.xml.
Don Muddiman
jwick
Moderator
Moderator
Posts: 3418
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: I know this is possible

Post by jwick »

Hi Don,

Generally the devices do not produce values > ~350.
Recent devices (last 10 years or so) actually clamp at +/- 350. Your older device may report farther along some axes.

Also, depending on whether you pushing or twisting in a different direction, an axis can be severely attenuated at the extremes.

There are a couple of tools to help:
1) 3DxTest shows the raw values from the device. You'll see this effect when you push and twist heavily at the same time.
2) If you turn logging on (3Dx systray icon->Write Log File), then use the free baretail utility to watch the log file (%localappdata%\3Dconnexion\3DxWare\3DxService.log), you will see keyboard chars are being sent out.
muddiman
Posts: 37
Joined: Sat Mar 17, 2007 6:01 am
Location: Lake City, FL
Contact:

Re: I know this is possible

Post by muddiman »

Hi Jim,

Thanks for assisting in solving the problem :-). After a few hours of troubleshooting, I realized something else had to be creating an issue. I was using COD Black Ops and notepad to proof the code because they both used low resources and loaded quickly. Well, come to find out, COD Black Ops has a problem using the Control key for the slice and notepad is not a good choice when testing my code. Notepad works great for simple text. All my devices were purchased back in 2017 and the AXIS has +/- values bumping 500. I did discover some tips when programming for gaming.

(1) For slices, do not use a Dead Zone, instead change the first initial slice value for the Dead Zone required.
(2) The ending value of the first slice needs to be the same as the starting value of the second slice.
(3) Disable 3D Connection before starting the game and then enable it and change one of the values to create and a base XML file.
(4) When changing the XML file while the game open, disable 3D Connection and then re-enable to update the changes.
(5) Make sure the WASD Dead Zones do not conflict with other Axis as it will cause inconsistent moment/commands

For setting slices, it would be nice if the 3DxTest had multiple Max peak value captures to average the sweet spot value that's indicates a comfortable hand pressure/position. I'm using the program Oxygen to program the XML files and wonder if you are using an Author template and/or a special template to for programming values quickly ? One other thought I had for programming would be to use a HID keyboard/axis output program to see real time output strings when testing values.
The code is now working great!
Thanks again,
Don
Don Muddiman
Post Reply