I'm using a SpaceMouse to control the stage of a microscope in the software that the vendor provides. With the SpaceMouse that works in a pretty neat and fast way. I would like to map/emulate that behavior with a keyboard, e.g., by accepting a right arrow press as a positive x axis move with the Space Mouse. (This is different from the typical question where you want to map your SpaceMouse inputs to Keyboard outputs.)
What would be the best way to achieve this behavior?
The current XML file for the tool is the following:
Code: Select all
<?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>TomoStudio</Name>
<ExecutableName>TomoStudio.exe</ExecutableName>
</Signature>
<Options />
</AppInfo>
<CfgProperties>
<ID>ID_TomoStudio</ID>
<Name>TomoStudio</Name>
<InheritsFromID>ID_Default_KMJ_Cfg</InheritsFromID>
</CfgProperties>
<AuthorInfo>
<DriverVersion>17.8.16.20445</DriverVersion>
<LastChange>
<Tool>3DxSmartUI.exe</Tool>
<Version>1.2.23265.20445</Version>
<Date>11/23/2023 5:15:57 PM UTC</Date>
<User>DF747110-FF2A-48B1-8D85-7AE2FD825A4C</User>
</LastChange>
</AuthorInfo>
<Devices>
<Device>
<ID>ID_Standard_3D_Mouse</ID>
<AxisFilter>Dominant</AxisFilter>
<AxisBank>
<Name>Default</Name>
<ID>Default</ID>
<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>false</Enabled>
<Input>
<ActionID>HIDMultiAxis_Z</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDMultiAxis_Z</ActionID>
</Output>
</Axis>
<Axis>
<Enabled>false</Enabled>
<Input>
<ActionID>HIDMultiAxis_Rx</ActionID>
<Min>-512</Min>
<Max>511</Max>
</Input>
<Output>
<ActionID>HIDMouse_Wheel</ActionID>
</Output>
</Axis>
</AxisBank>
</Device>
</Devices>
</AppCfg>
Code: Select all
<Axis>
<Enabled>true</Enabled>
<Input>
<ActionID>KB_Keystroke</ActionID>
<RepeatStyle>PressAndHold</RepeatStyle>
<KeyStroke>
<Key>4F</Key>
</KeyStroke>
</Input>
<Output>
<ActionID>HIDMultiAxis_X</ActionID>
</Output>
</Axis>,
However, I have not yet been able to make this work. The main questions that I couldn't answer are the following:
- How do I achieve the mapping of one key press to a single value of the SpaceMouse? (If I need to at all)
- What would be the correct syntax for that?
- How do I separate between key presses and press-and-holds?
Best wishes
Henning