# Input Configuration XML Properties The `[device_name].xml` file is the **input configuration file** which is used to create custom input bindings within the simulation for different devices. The file contains information that binds specific inputs from a controller (XBox gamepad, mouse, VR controller, joystick, etc...) to specific [input event actions.](../../../programming-apis/key-events/key-events-index/) This file is created automatically for you when you use [The Input Profile Editor](../../../devmode/editors/input-editors/the-input-profile-editor/), and a such, this page is provided **purely for reference** and all edition of the file should be done using the editor to ensure that it is set up correctly. Please see the following pages for more information on how to do this: - [Setting Up Transversal Bindings](../transversal-input-profiles/) - [Aircraft Category Profiles](../aircraft-category-input-profiles/) - [Aircraft Specific Input Profiles](../aircraft-specific-input-profiles/) this file has the following schematic structure: ``` xml ``` ### <DefaultInput> This is the container element within which all the other elements that define the input bindings will be stored. It has the following sub-elements: - [``](#version-) - [``](#device) It requires the following attributes: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | | --- | --- | --- | :---: | | {{< anchor id="Primary" />}}`Primary` | This shows whether the profile is the "primary" profile or not. When set to 1, the profile will be applied as the default profile when the simulation is started and the device is connected. When set to 0, it will not be applied automatically. | Bool | Yes | | {{< anchor id="PlatformAvailability" />}}`PlatformAvailability` | This sets what platforms the device profile is valid for. The possible options are:{{< params/smallfont-list >}}"PC""XBOX""PLAYSTATION""PC, XBOX""PC, PLAYSTATION""XBOX, PLAYSTATION""ALL"{{< /params/smallfont-list >}} | String | Yes | {{< /table-wrapper >}} ### <Version /> This self-closing element is a sub-element of [``](#defaultinput) and is used to identify the current version of the file. Note that every time you save the file using the [Input Profile Editor](../../../devmode/editors/input-editors/the-input-profile-editor/), this number will be incremented automatically. It requires the following attributes: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | |-----------|-------------|---------|:--------:| | {{< anchor id="Num" />}}`Num` | The current version number of the file. | Integer | Yes | {{< /table-wrapper >}} ### <Device> This sub-element of [``](#defaultinput) is the container element that holds all the different inputs and global values related to the device that was used for the input profile. It has the following sub-elements: - [``](#axes) - [``](#context) It requires the following attributes: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | | --- | --- | --- | :---: | | {{< anchor id="DeviceName" />}}`DeviceName` | The identifying name of the device. | String | Yes | | {{< anchor id="GUID" />}}`GUID` | The unique {{< glossterm >}}guid{{< /glossterm>}} for the device. This is the reference the simulation will use to identify the device, and must be in the format "`{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx}`", all lower case, for example:`GUID="{3b2577e0-8753-11ed-8004-444553540000}`". | String | Yes | | {{< anchor id="ProductID" />}}`ProductID` | This is the product ID for the device being defined. The ID should be formatted as a hexadecimal value. For example, if the Product ID is 767 you would have:ProductID="0x2FF"You can find the product ID from the device properties in the [The Input Device Editor](../../../devmode/editors/input-editors/the-input-device-editor/). | Hexadecimal | Yes | | {{< anchor id="CompositeID" />}}`CompositeID` | This is the composite ID for the device being defined, expressed as an integer. You can find the composite ID from the device properties in the the [The Input Device Editor](../../../devmode/editors/input-editors/the-input-device-editor/). | Integer | Yes | | {{< anchor id="HWVer" />}}`HWVer` | Hardware version of the device. Similar to the composite ID, the hardware version is used to link multiple parts together when they do _not_ all belong to a single product ID. | String | Yes | {{< /table-wrapper >}} ### <Axes> This sub-element of [``](#defaultinput) is the container element that holds the global axis values, defined using multiple [``](#axis-) elements. This element has no attributes. ### <Context> This sub-element of [``](#device) is used to store the bound inputs associated with a specific simulation *context*. Context is an internal setting used by the simulation to enabled/disable inputs based on what the user is doing within the simulation (for example, using the drone camera, using cockpit controls, etc...). As such, the input profile XML file will normally have multiple `` entries, and within each context you will have multiple [``](#action) elements defining the inputs bound to the context. You can find more information on context here: - [Understanding Contexts And Profiles](../input-profiles/#understanding-contexts-and-profiles) This element has the following attribute: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | |---------------|----------------------------------------------------------------|--------|:--------:| | {{< anchor id="ContextName" />}}`ContextName` | The context name for the actions contained within the element. | String | Yes | {{< /table-wrapper >}} ### <Action> This sub-element of [``](#context) is used to hold the input bindings to specific input event actions. It can have the following two sub-elements: - [``](#primary) - [``](#secondary) This element has the following attributes: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | | --- | --- | --- | :---: | | {{< anchor id="ActionName" />}}`ActionName` | This is the name of the input event action that the primary (and secondary) device input will be bound to. The action name is _either_:{{< params/smallfont-list >}}An [Event ID](../../../programming-apis/key-events/key-events-index/) - prefixed with `KEY_` - if the profile is _transversal_ or for an _aircraft category_. For example:ActionName="KEY_KOHLSMAN_INC"An [Input Event](../../models/modelbehaviors/input-event-xml-properties/) taken from from the aircraft **model behaviours** if the profile is an _aircraft specific_ profile. For example:ActionName="AIRFRAME_ALTERNATE_AIR_GEAR_INC"{{< /params/smallfont-list >}} | String | Yes | | {{< anchor id="Flag" />}}`Flag` | This is a _bit-flag_ which is used to define the kind of input that is being received from the device being defined. The following values can be combined to create a single flag value that defines the way the input will be interpreted:{{< params/smallfont-list >}}1 = FL_ANALOG2 = FL_DIGITAL4 = FL_AXIS8 = FL_NO_MOD16 = FL_MOD_CTRL
6. 32 = FL_MOD_SHIFT64 = FL_MOD_ALT128 = FL_MOD_INV256 = FL_MOD_UP512 = FL_MOD_VALUE1024 = FL_MOD_NO_SENS_CURVE2048 = FL_MOD_RESET_ONCONTEXT_DISABLED4096 = FL_MOD_AXIS_OVERRIDE8192 = FL_MOD_PRESSED16384 = FL_MOD_DELAYED_EXCLUSIVE32768 = FL_MOD_NO_KEYBOARD_LAYOUT{{< /params/smallfont-list >}}For a full description of these flags, please see the section on [Action Options](../../../devmode/editors/input-editors/the-input-profile-editor/#action-options). It should be noted that:{{< params/smallfont-list>}}MOD_VALUE will require the `ValueEvent` attribute to be used, and _cannot_ be used on [Transversal Input Profiles](../transversal-input-profiles/).MOD_AXIS_OVERRIDE can _only_ be used on [Transversal Input Profiles](../transversal-input-profiles/){{< /params/smallfont-list >}} | Integer | Yes | | {{< anchor id="ValueEvent" />}}`ValueEvent` | This is the value that will be sent when the event is triggered. | Float/Integer | No | {{< /table-wrapper >}} #### <Primary> This is a sub-element of [``](#action) and is used to define the primary input for the event action. The element has no attributes and must contain one [``](#key) sub-element, and optionally - depending on whether the input has a custom axis definition - one [``](#axis-) sub-element. #### <Secondary> This is a sub-element of [``](#action) and is used to define the secondary input for the event action. The element has no attributes and must contain one [``](#key) sub-element, and optionally - depending on whether the input has a custom axis definition - one [``](#axis-) sub-element. ### <Axis /> This element can be used in the [``](#axes) and [``](#action) elements to define the properties of a single axis of the device. This is a self-closing element with the following attributes: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | | --- | --- | --- | :---: | | {{< anchor id="AxisName" />}}`AxisName` | The name of the axis being defined. Must be one of the following:{{< params/smallfont-list >}}"X""Y""Z""rX""rY""rZ""SliderX""SliderY"{{< /params/smallfont-list>}} | String | Yes | | {{< anchor id="AxisSensitivy" />}}`AxisSensitivy` | The positive sensitivity of the chosen axis, defined as a value between 0 and 100. | Integer | Yes | | {{< anchor id="AxisSensitivyMinus" />}}`AxisSensitivyMinus` | The negative sensitivity of the chosen axis, defined as a value between -100 and 0. | Integer | Yes | | {{< anchor id="AxisDeadZone" />}}`AxisDeadZone` | The inside position of the chosen axis dead zone, defined as a value between 0 and 100. | Integer | Yes | | {{< anchor id="AxisOutDeadZone" />}}`AxisOutDeadZone` | The outside position of the chosen axis dead zone, defined as a value between 0 and 100. | Integer | Yes | | {{< anchor id="AxisNeutral" />}}`AxisNeutral` | The chosen axis neutral position, defined as a value between -100 and 100. | Integer | Yes | | {{< anchor id="AxisResponseRate" />}}`AxisResponseRate` | The response rate for the chosen axis, defined as a value between 100 and 2000. You can use -1 to ignore this attribute and use the default sensitivity. | Integer | Yes | {{< /table-wrapper >}} ### <KEY> This is a sub-element of both the [``](#primary) and [``](#secondary) elements, and is used to define a single input source from a device. Note that the value given inside the `` tag is generated by the [Input Profile Editor](../../../devmode/editors/input-editors/the-input-profile-editor/) and is essentially the numeric ID for the `Information` attribute input source, in a format that can be easily read by the simulation. You should not change this value or try to use your own. This element has the following attribute: {{< table-wrapper "200px" "" "150px" "100px" >}} | Attribute | Description | Type | Required | |-----------|-------------|--------|:--------:| | {{< anchor id="Information" />}}`Information` | This is the name of the input source as returned by the device or as shown in the [Device Keys](../../../devmode/editors/input-editors/the-input-profile-editor/#device-keys) window. | String | Yes | {{< /table-wrapper >}}