First thing first all apologies for my limited understanding of all the programming matters discussed around here.
I have been trying to implement a Modifier Key on a non 3Dconnexion device (keyboard or mouse), that would act upon my SpaceMouse (basic model).
Jwick kindly provided this code that does just that (switching Spacemouse to Joystick input back and forth), but the Modifier Key is on the Spacemouse itself.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<AppCfg Default="false" xmlns="" CfgFormatVersion="1.3" ThisFileVersion="1.8">
<CfgProperties>
<ID>ID_STR_JET</ID>
<Name>STR_JET</Name>
<InheritsFromID>ID_STR_JET</InheritsFromID>
<Access>
<AllowInheritance>true</AllowInheritance>
<Hidden>false</Hidden>
<Ignore>false</Ignore>
</Access>
</CfgProperties>
<AppInfo>
<Signature>
<Name>STR_JET</Name>
</Signature>
<Options/>
</AppInfo>
<AuthorInfo>
<DriverVersion>17.8.20.20889</DriverVersion>
<LastChange>
<Tool>3DxService.exe</Tool>
<Version>17.8.20.20889</Version>
<Date>2024:4:3:17:8:57:45:403</Date>
<User>ADB714F4-85D1-4915-8A36-C6796D456743</User>
</LastChange>
<Created>
<Tool>3DxService.exe</Tool>
<Version>17.8.21.20868</Version>
<Date>2024:4:3:17:7:43:52:955</Date>
<User>ADB714F4-85D1-4915-8A36-C6796D456743</User>
</Created>
</AuthorInfo>
<ButtonActions>
<!-- Axis/ApplicationBank operations -->
<ButtonAction Type="AxisBank">
<ID>AxisBank_ShiftToJoystick</ID>
<Name>Shift to Joystick</Name>
<Action>PushPop</Action>
<BankID>JoystickBank</BankID>
<ApplyTo>All</ApplyTo>
</ButtonAction>
<ButtonAction Type="ApplicationBank">
<ID>ApplicationBank_ShiftLockToJoystick</ID>
<Name>ShiftLock to Joystick</Name>
<Action>Push</Action>
<BankID>JoystickBank</BankID>
<ApplyTo>All</ApplyTo>
</ButtonAction>
<ButtonAction Type="ApplicationBank">
<ID>ApplicationBank_Pop</ID>
<Name>Pop Back</Name>
<Action>Pop</Action>
<BankID>Default</BankID>
<ApplyTo>All</ApplyTo>
</ButtonAction>
</ButtonActions>
<Devices>
<Device>
<ID>ID_Standard_3D_Mouse</ID>
<Name>Standard 3D Mouse</Name>
<AxisFilter>None</AxisFilter>
<CurrentAxisBank>Default</CurrentAxisBank>
<AxisBank Default="true">
<ID>JoystickBank</ID>
<Name>JoystickBank</Name>
<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>
</AxisBank>
<ButtonBank Default="true">
<ID>Default</ID>
<Name>Default</Name>
<InheritsFromID/>
<Button>
<Input>
<ActionID>V3DK_MENU_1</ActionID>
</Input>
<Output>
<ActionID>AxisBank_ShiftToJoystick</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_MENU_2</ActionID>
</Input>
<Output>
<ActionID>ApplicationBank_ShiftLockToJoystick</ActionID>
</Output>
</Button>
</ButtonBank>
<ButtonBank>
<ID>JoystickBank</ID>
<Name>JoystickBank</Name>
<InheritsFromID/>
<Button>
<Input>
<ActionID>V3DK_MENU_1</ActionID>
</Input>
<Output>
<ActionID>AxisBank_ShiftToJoystick</ActionID>
</Output>
</Button>
<Button>
<Input>
<ActionID>V3DK_MENU_2</ActionID>
</Input>
<Output>
<ActionID>ApplicationBank_Pop</ActionID>
</Output>
</Button>
</ButtonBank>
</Device>
</Devices>
</AppCfg>Clicking twice on a single device takes much more time than clicking on two devices one after the other.
Also if by any chance you could have multiple modifier keys, then those keys could be picked up by Autohotkey and allow for an awesome array of quick shortcuts.
For exemple:
- Push ModifierKey1 [spacemouse now send joystick input] & Y+ motion -> Autohotkey detects ModifierKey1 & Y+ joystick -> Autohotkey sends Circle command
- Push ModifierKey2 [spacemouse now send joystick input] & Y+ motion -> Autohotkey detects ModifierKey2 & Y+ joystick -> Autohotkey sends square command
---
It is my understanding that you can easily emulate external device input with a 3Dconnexion device, but the other way around is impossible (like manipulating the Spacemouse inputs via a mouse or keyboard).
So maybe what I want to achieve is impossible.
But then what about the usual Function and Modifier Keys suck as ESC, ALT or SHIFT ? Surely the 3DxWare driver listen to those input.
Could I be able to use those as Modifers Keys that would act upon the Spacemouse ?
Thanks for your help
