VIVALDI (And possibly other browsers after some work) 3D Connexion two axis scroll profile.

by

With recent aquisition of post-leasing 3d connexion space pilot controller, I've been told by friend that its extremaly comfy to use to scroll websites - and it is!

However, default config / Chrome config dont support 2 axis scrolling, and there is no straightforward way to do it.

After some tinkering with the XML profiles, I've managed to make a vivaldi (in my example, but if you copy content to desired browser profile xml with changing executableName file it should work as well) scroll in both top-bottom direction, as well left and right - which is especially usefull while checking high-res images on the web, or reading huge blocks of text that wasnt OCR correctly and are still hosted in pdf/png.

Code of the profile:

  <?xml version="1.0" encoding="utf-8" standalone="no"?>
<AppCfg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Default="false" CfgFormatVersion="1.3" ThisFileVersion="1.13">
  <AppInfo>
    <Signature>
      <Name>vivaldi</Name>
      <ExecutableName>vivaldi.exe</ExecutableName>
    </Signature>
    <Options />
  </AppInfo>
  <CfgProperties>
    <ID>ID_vivaldi</ID>
    <Name>vivaldi</Name>
    <InheritsFromID>ID_Default_KMJ_Cfg</InheritsFromID>
  </CfgProperties>
  <Devices>
    <Device>
      <ID>ID_Standard_3D_Mouse</ID>
      <AxisBank Default="true">
        <ID>Default</ID>
        <Name>STR_DEFAULT_BANK</Name>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_X</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <ActionID>HIDMultiAxis_X</ActionID>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Y</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <ActionID>HIDMultiAxis_Y</ActionID>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Z</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <ActionID>HIDMouse_Wheel</ActionID>
            <Modifier>Control</Modifier>
            <Modifier>Control</Modifier>
            <Modifier>Control</Modifier>
            <Modifier>Control</Modifier>
            <Modifier>Control</Modifier>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Rx</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <ActionID>HIDMouse_Wheel</ActionID>
            <Scale>1.0000</Scale>
            <Reversed>true</Reversed>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Ry</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <!-- mhoopes -->
            <ActionID>HIDMouse_Wheel</ActionID>
            <Modifiers>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
            </Modifiers>
          </Output>
        </Axis>
        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Rz</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <ActionID>HIDMultiAxis_Rz</ActionID>
          </Output>
        </Axis>
      </AxisBank>
    </Device>
    <Device>
      <ID>ID_ProductID_C629</ID>
      <ButtonBank Default="true">
        <Name>STR_DEFAULT_BUTTONBANK</Name>
        <ID>Default</ID>
        <Button>
          <Input>
            <ActionID>HIDButton_22</ActionID>
          </Input>
          <Output>
            <ActionID>KB_Alt</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>HIDButton_17</ActionID>
          </Input>
          <Output>
            <ActionID>Ctrl+P</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>HIDButton_2</ActionID>
          </Input>
          <Output>
            <ActionID>App_ResetYourView</ActionID>
          </Output>
        </Button>
        <Button>
          <Input>
            <ActionID>HIDButton_11</ActionID>
          </Input>
          <Output>
            <ActionID>Ctrl+Shift</ActionID>
          </Output>
        </Button>
      </ButtonBank>
    </Device>
  </Devices>
  <AuthorInfo>
    <DriverVersion>17.8.5.19118</DriverVersion>
    <LastChange>
      <Tool>3DxSmartUI.exe</Tool>
      <Version>1.2.22028.19118</Version>
      <Date>3/3/2022 8:45:01 PM UTC</Date>
      <User>piro</User>
    </LastChange>
    <Created>
      <Tool>3DxService.exe</Tool>
      <Version>17.8.5.19118</Version>
      <Date>2022:3:3:2:17:50:8:996</Date>
      <User>piro</User>
    </Created>
  </AuthorInfo>
  <Settings>
    <OverallScale>1.00</OverallScale>
  </Settings>
  <MacroTable>
    <MacroEntry>
      <ID>Ctrl+P</ID>
      <KeyStroke>
        <Modifiers>
          <Modifier>Control</Modifier>
        </Modifiers>
        <Key>13</Key>
      </KeyStroke>
    </MacroEntry>
    <MacroEntry>
      <ID>Ctrl+Shift</ID>
      <KeyStroke>
        <Modifiers>
          <Modifier>Control</Modifier>
        </Modifiers>
        <Key>E1</Key>
      </KeyStroke>
    </MacroEntry>
  </MacroTable>
</AppCfg>

After replacing it, you can add normal key shortcuts using 3d connexion software.

If youre interested just in vertical scrolling fragment:

        <Axis>
          <Enabled>true</Enabled>
          <Input>
            <ActionID>HIDMultiAxis_Ry</ActionID>
            <Min>-512</Min>
            <Max>511</Max>
          </Input>
          <Output>
            <!-- mhoopes -->
            <ActionID>HIDMouse_Wheel</ActionID>
            <Modifiers>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
              <Modifier>Shift</Modifier>
            </Modifiers>
          </Output>
        </Axis>

Thats the part that re-maps device's Ry axis to mouse scroll + shift.

The trickiest part was to make software NOT overwrite my changes, turned out that while normal config directory is: 

C:\Program Files\3Dconnexion\3DxWare\3DxWinCore\Cfg\vivaldi.xml

After reboot, it somehow overwrite my profile, and correct location was:

C:\Users\piro\AppData\Roaming\3Dconnexion\3DxWare\Cfg\vivaldi-KMJ.xml

 

Hope someone will find this little hack usefull.