DEVICEDB XML PROPERTIES

The *.devicedb file is created using the Input Application and is an XML formatted file used to create a hardware support file to be used in the simulation as part of an input profile. The purpose of these files is to store hardware information - identification, platform, etc... - as well as all the actions available for the input profile and their event mappings. There can be various versions of this file, where each one is a new mapping set. Note that generally you should never need to edit or create this file manually, and it should always be created through the Input Application.

 

The *.devicedb file has the following schematic structure:

<?xml version="1.0" encoding="utf-8"?>
<DeviceDefinition>
    <Device PrimaryMapping="1" Device_Type="4" GUID="00000000-0000-0000-0000-000000000000" ProductID="0000" CompositeID="0" HWVer="1.0.0.0" PlatformAvailability="PC, XBOX" ExportPath="InputProfiles\ALL\">
        <Name>MyDevice_01</Name>
        <Axes>
          <Axis AxisName="AXIS_A" AxisSensitivy="0" AxisSensitivyMinus="0" AxisDeadZone="0" AxisOutDeadZone="0" AxisNeutral="0" AxisResponseRate="0"/>
        </Axes>
        <CompleteBind>
            <RefAction>KEY_MY_ACTION|MY_CONTEXT</RefAction>
            <Primary ReadableBind="BUTTON_1(+)BUTTON_2(+)BUTTON_3(+)AXIS_A" ValueEvent="1" ControlOverride="AXIS, MOD_VALUE">
                <Key ID="1" />
                <Key ID="2" />
                <Key ID="3" />
                <Key ID="5" />
            </Primary>
            <Secondary ReadableBind="BUTTON_4">
                <Key ID="4" />
            </Secondary>
        </CompleteBind>
    </Device>
</DeviceDefinition>

 

You can find a tutorial on how to create input profiles on the following page:

 

 

<DeviceDefinition>

This is a container element for all the details of the different hardware device definitions for the profile. Should contain the following sub-element:

  1. <Device>

 

 

<Device>

This is a child element of <DeviceDefinition> and is the top-level container for a single device definition. It can contain the following sub-elements:

  1. <Name>
  2. <Axes>
  3. <CompleteBind>

 

It can have the following attributes:

 

Attribute Description Type Required
PrimaryMapping This is used to set if the device is the default device "True" or not "False". For each PID (Product ID) there should only be one default device defined. Boolean Yes
Device_Type

This is what defines the type of device that is being mapped, and requires one of the following integer values:

  1. 1 - Generic keyboard ("Keyboard" in the Input App)
  2. 2 - Generic mouse ("Mouse" in the Input App)
  3. 3 - XBox controller PC ("Xinput Gamepad" in the Input App)
  4. 4 - Direct Input controller ("Controller XBox One For WIndows" in the Input App)
  5. 10 - VR Gamepad Controller ("XR Controller Left / Right" in the Input App)
  6. 11 - Xbox Series Joystick controller ("Xbox Series Stick" in the Input App)
  7. 13 - Tobii Eyetracker ("Tobii Eye Tracker" in the Input App)
Integer Yes
GUID This is the unique identifier for the device. String Yes
ProductID This is the product identifier number, which is given by the firmware of the device. String Yes
CompositeID This is the product composite ID. Some devices use this string to link multiple parts to a unique PID (e.g. HOTAS…). The value here is given by the device itself. String Yes
HWVer This is the product hardware version. Some devices can be connected together even if they are from different brands. The value here is given by the device itself. String Yes
PlatformAvailability

Target platform that can use the device, which can be one of the following strings:

  1. ALL
  2. XBOX
  3. PC
String Yes
ExportPath Export directory for the input presets of this device. This is normally left as an empty string "" unless you have some specific setup requirements. String Yes

 

 

<Name>

This is a child element of <Device> and is the "common" name of the device, as defined in the Input Application. This name is displayed in the simulation.

 

 

<Axes>

This is a child element of <Device> and is a container element used to define the different axes the device supports. It has no attributes and requires one or more <Axis /> sub-elements.

 

 

<Axis />

This is a self-closing element and is used inside the <Axes> container to define a single axis of movement for the controller. It can have the following attributes:

 

Attribute Description Type Required
AxisName THis is the name of the axis, as given by the device. String Yes
AxisSensitivy This defines the float value by which the output axis curve is multiplied when X > 0, ie:
$$\texterm{OutputAxis} = +InputAxis \times AxisSensitivity$$
Float Yes
AxisSensitivyMinus This defines the float value by which the output axis curve is multiplied when X < 0, ie:
$$\textterm{OutputAxis} = -InputAxis \times AxisSensitivityMinus$$
Float Yes
AxisDeadZone This sets the axis "deadzone", which is the value within which no movement on the axis will be detected, expressed as a Percent Over 100. For example, value of 0.25 would mean that you need to move the controller along the axis 25% (in either direction) before it will be registered as having moved.

Float

Yes
AxisOutDeadZone This sets the axis "deadzone" exit, which is the value outside of which all movement on the axis will be detected as 100%, expressed as a Percent Over 100. For example, value of 0.75 would mean that if you move the controller along the axis 75% (in either direction) it will be registered as having moved 100%. Float Yes
AxisNeutral This sets the axis neutral position, which is used to offset the "center point" for the controller on the axis being defined. This is expressed as a positive or negative Percent Over 100. Float Yes
AxisResponseRate This can be used to define an input delay - in milliseconds - to be applied to the axis output. This can be a value between 0 and 2000. Float Yes

 

 

<CompleteBind>

This is a child element of <Device> and is used to define the mapping between an action and an input from the controller. In general, you should have one of these for every action in the project, even if there is no controller binding for that particular action (for example, if the hardware device the file refers to does not support axis movement, but the *.actiondb has actions for axis controllers, there should still be <CompleteBind> definitions for the actions, but they will be "empty").

 

This element has no attributes and is a container for the following:

  1. <RefAction>
  2. <Primary>
  3. <Secondary>

 

 

<RefAction>

This is a child element of <CompleteBind> and is used to set the action and the context to bind (map) to a controller input. The element has no attributes, and takes a string with the following format:

<RefAction>ACTION_NAME|CONTEXT</RefAction>

For a list of the actions available please see the Key Events section, and for a list of contexts, please see the Available Contexts section.

 

 

<Primary>

This is a child element of <CompleteBind> and defines the primary input(s) assigned to the action. It can have the <Key> sub-element and requires the following attributes:

 

Attribute Description Type Required
ReadableBind The input (or inputs) that are being bound (mapped). If more than one input is being mapped then it should be appended using (+), for example:
<Primary ReadableBind="LeftAlt(+)F8" ValueEvent="0" ControlOverride="DIGITAL">
In this example the action is being bound (mapped) to the key combination LeftAlt + F8. Note that you can have up to 4 inputs combined in a single binding. See the Binding Tables section for most of the avialable binding strings per device.
String Yes
ValueEvent This is a value that is used to define a value that is transmitted when the given device input is triggered. By default, a bound input event will send either a 1 or a 0 when pressed/moved/detected. However, it may be that you wish to send a specific value along with the input event, in which case you would set that value here. Note that you must also select MOD VALUE from the ControlOverride attribute for the value to be sent successfully. Integer Yes
ControlOverride

This sets the type of controller input as well as any overrides on that control. The overrides are given as a comma seperated list of values, for example:

<Primary ReadableBind="R" ValueEvent="0" ControlOverride="DIGITAL, MOD_PRESSED">

Available override strings are as follows:

  1. DIGITAL - The input will regarded as being a digital "on/off" input.
  2. ANALOGICAL - The input will be considered as an analog input. Note that this is supplied for compatibility with certain joystick devices, but usually any analog input would use the Axis type.
  3. AXIS - The input will be considered as some kind of analog input.
  4. MOD_INV - The input will be inverted.
  5. MOD_UP - Normally input is sent on the press of a button, however when this modifier is added, input will be sent when on the release. This is normally only valid for digital input.
  6. MOD_PRESSED - When a button is pressed the normal behaviour is for the pressed event to be sent every frame that the button is held down. However when this modifier is added, input will be sent only once, on the initial press. This is normally only valid for digital input.
  7. MOD_VALUE - The input will send a value other than 0 - 1, as set in the Value Send On Event section.
  8. MOD_AXIS_OVERRIDE - This will be added automatically when you choose the Override Axis option, and signifies that the global axis settings should be overridden by a custom setting for this input event binding.
  9. MOD_DELAYED_EXCLUSIVE - This modifier creates a small delay between the press being intercepted and then transmitted. Using this mod means that the input will need to be held down for the event to be triggered.
  10. MOD_NO_KEYBOARD_LAYOUT - By default, the simulation will auto-convert inputs from ANSI to ISO. For example, if the input is mapped to Q, then pressing A on an AZERTY keyboard will still activate the mapped event. However, with this modifier, you can disable this deafult behavior and instead force the input to be "raw" with no conversion.
String Yes

 

 

<Key />

This is a child element of <Primary> (and <Secondary>) element and is used to define one or more ID values for the inputs used in the ReadableBind attribute of the parent element. This is a self-closing element, and there should be one defined for every input used in the ReadableBind attribute of the parent element.

 

This element has the following attribute:

 

Attribute Description Type Required
ID The ID value for the key. This value is determined automatically by the Input Application and you should never edit this value manually. Integer Yes

 

 

<Secondary>

This is a child element of <CompleteBind> and defines the secondary input(s) assigned to the action. It can have the <Key> sub-element and requires the following attribute (the secondary input will inherit the values for ValueEvent and ControlOverride from the <Primary> element):

 

Attribute Description Type Required
ReadableBind The input (or inputs) that are being bound (mapped). If more than one input is being mapped then it should be appended using (+), for example:
<Secondary ReadableBind="LeftShift(+)Down">
In this example the action is being bound (mapped) to the key combination LeftShift + Down. Note that you can have up to 4 inputs combined in a single binding. See the Binding Tables section for most of the avialable binding strings per device.
String Yes

 

 

Binding Tables

The tables below show the available bindings that can be used for each of the available input device types. The values in the tables are used in the <Primary> and <Secondary> element ReadableBind attribute. Note that the Generic Mouse and Tobii Eye Tracker types have no binding reference values.

 

 

Generic keyboard ("Keyboard" in the Input App)

NOTE: This list is not exhaustive. For any keys not listed here use the Input Application Mappings window.

Controller Input Primary / Secondary Binding Reference
Keys A - Z "A" > "Z"
Left Shift "LeftShift"
Right Shift "RightShift"
Left Control "LeftCtrl"
Right Control "RightCtrl"
Left Alt "LeftAlt"
Right Alt "RightAlt"
Number Pad 0 > 9 "NumPad0" > "NumPad9"
Numbers 0 > 9 "D1" > "D9"
F1 > F12 "F1" > "F12"
Left Arrow "Left"
Right Arrow "Right"
Up Arrow "Up"
Down Arrow "Down"
Tab "Tab"
Escape "Escape"
Backspace "Back"
Enter "Return"
Spacebar "Space"
Home "Home"
Insert "Insert"
End "End"
Delete "Delete"
Pause "Pause"
Tilde key ~ "Oem5"
Plus + (OEM) "OemPlus"
Minus - (OEM) "OemMinus"
Plus + "Add"
Minus - "Subtract"

 


XBox controller PC ("Xinput Gamepad" in the Input App)

Controller Input Primary / Secondary Binding Reference
A A
B B
X X
Y Y
LB LB
RB RB
LT LT
RT RT
L-STICK LSTICK
R-STICK RSTICK
BACK BACK
START START
D-PAD LEFT LEFT
D-PAD RIGHT RIGHT
D-PAD UP UP
D-PAD DOWN DOWN
L-STICK LEFT LANALOG_LEFT
L-STICK RIGHT LANALOG_RIGHT
L-STICK UP LANALOG_UP
L-STICK DOWN LANALOG_DOWN
R-STICK LEFT RANALOG_LEFT
R-STICK RIGHT RANALOG_RIGHT
R-STICK UP RANALOG_UP
R-STICK DOWN RANALOG_DOWN
L-STICK X LANALOG_X
L-STICK Y LANALOG_Y
R-STICK X RANALOG_X
R-STICK Y RANALOG_Y

 

 


Direct Input controller ("Controller XBox One For WIndows" in the Input App)

Controller Input Primary / Secondary Binding Reference
A Button1
B Button2
X Button3
Y Button4
LB Button5
RB Button6
LT Axis Z
Axis Z+
RT Axis Z
Axis Z-
L-STICK Button9
R-STICK Button10
BACK Button7
START Button8
D-PAD LEFT POV1
POV1_LEFT
D-PAD RIGHT POV1
POV1_RIGHT
D-PAD UP POV1
POV1_UP
D-PAD DOWN POV1
POV1_DOWN
L-STICK LEFT Axis X-
L-STICK RIGHT Axis X+
L-STICK UP Axis Y-
L-STICK DOWN Axis Y+
R-STICK LEFT Rotation X-
R-STICK RIGHT Rotation X+
R-STICK UP Rotation Y-
R-STICK DOWN Rotation Y+
L-STICK X Axis X
L-STICK Y Axis Y
R-STICK X Rotation X
R-STICK Y Rotation Y

 


VR Gamepad Controller ("XR Controller Left / Right" in the Input App)

Controller Input Primary / Secondary Binding Reference
Click A A_CLICK
Touch A A_TOUCH
Click B B_CLICK
Touch B B_TOUCH
Back BACK_CLICK
Menu MENU_CLICK
Select SELECT_CLICK
Click Squeeze SQUEEZE_CLICK
Force Squeeze SQUEEZE_FORCE
Value Squeeze SQUEEZE_VALUE
Click System SYSTEM_CLICK
Touch System SYSTEM_TOUCH
Touch Thumbrest THUMBREST_TOUCH
Click Thumbstick THUMBSTICK_CLICK
Touch Thumbstick THUMBSTICK_TOUCH
Horizontal Thumbstick THUMBSTICK_X
Vertical Tumbstick THUMBSTICK_Y
Click Trackpad TRACKPAD_CLICK
Force Trackpad TRACKPAD_FORCE
Touch Trackpad TRACKPAD_TOUCH
Horizontal Trackpad TRACKPAD_X
Vertical Trackpad TRACKPAD_Y
Click Trigger TRIGGER_CLICK
Touch Trigger TRIGGER_TOUCH
Value Trigger TRIGGER_VALUE
Click X X_CLICK
Touch X X_TOUCH
Click Y Y_CLICK
Touch Y Y_TOUCH
Trackpack Left TRACKPAD_LEFT_CLICK
Trackpack Right TRACKPAD_RIGHT_CLICK
Trackpack Down TRACKPAD_UP_CLICK
Trackpack Up TRACKPAD_DOWN_CLICK

 

 

Xbox Series Joystick controller ("Xbox Series Stick" in the Input App)

Controller Input Primary / Secondary Binding Reference
Configurable Buttons 1 > 78 "Button1" > "Button78"
Configurable Axis 1 > 16 "Axis 1" > "Axis 16"
Configurable Axis+ 1 > 16 "Axis 1 +" > "Axis 16 +"
Configurable Axis- 1 > 16 "Axis 1 -" > "Axis 16 -"
Hat Up POV_UP
Hat Down POV_DOWN
Hat Left POV_LEFT
Hat Right POV_RIGHT
Hat Up Left POV_UP_LEFT
Hat Up Right POV_UP_RIGHT
Hat Down Left POV_DOWN_LEFT
Hat Down Right POV_DOWN_RIGHT