# DeviceConfig XML Properties The **DeviceConfig.xml** file is used to determine how different **device profiles** will be displayed within the UI. Each device input package should only ever have *one* of these files, and it must always be named "DeviceConfig" for the simulation to recognize it.   This file is created automatically for you when you use [The Input Device Editor](../../devmode/editors/input-editors/the-input-device-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 page for more information on how to do this: - [Device Profiles](device-profiles/)   The `DeviceConfig.xml` file has the following schematic structure: ``` xml ... ... ... ... ```     ### <DeviceConfig> This is a container element where you will place one or more `` sub-elements. This element has no attributes.     ### <Device> This element is a sub-element of `` and is used to setup a specific device definition for use in the simulation UI. If the device has no icons then the element is self-closing, otherwise it will have one or more `` sub-elements. Note that if the device is **Keyboard** or **Mouse** then you *cannot* use the `` sub-element as these inputs will always use the default UI icons.   It can have the following attributes:  
AttributeDescriptionTypeRequired
ProductID

This is the product ID for the device being defined. The ID should be formatted as a hexadecimal value, prefixed by "0x". You can find the product ID from the Input Device Editor. For example, if the Product ID is 767 you would have:

ProductID="0x02FF"
StringYes
Platform

This sets the platform(s) that the device can be used on. If the device can be used on all platforms, this attribute can be omitted, otherwise you can use one of the following strings to limit the device to that platform:

  1. "PC"
  2. "XBOX"
  3. "PLAYSTATION"
  4. "PC, XBOX"
  5. "PC, PLAYSTATION"
  6. "XBOX, PLAYSTATION"
  7. "ALL"
StringNo
CompositeIDThis is the composite ID for the device being defined, expressed as an integer. You can find the composite ID from the Input Device Editor.IntegerNo
DisplayNameThis is the name of the device that will be displayed in the UI.StringYes
TextureFolderThis is the relative path to the texture folder where the required images and optional icons can be found. Each device requires a unique folder which should be named the same as the Input Configuration XML file.StringYes
PriorityThis sets the priority in the UI for the device profile, expressed as an integer, where a lower value will represent a higher priority in the UI list. If this attribute is not included, then the default priority is 0.IntegerNo
    ### <MergeIcons> This is a sub-element of `` and is used to define one or more icons that can be used to represent a button, axis or slider on the device being defined. The icons to be used should be placed within the folder defined in the `` attributes. It is recommended that you have a merge icon tag for *every* input on the controller, although it is assumed that you will assign the same icon to multiple inputs (for example, a single "Left Stick" icon can be assigned to the left stick +X, -X, +Y and -Y inputs).   This element can have the following attributes:  
AttributeDescriptionTypeRequired
SourceIcons

A combination of "keys" which represent specific in-sim actions. These "keys" will be bound to the target icon and localised text. See the Device Keys section for more information. For multiple keys, they should be concatenated using &amp; symbol, for example:

SourceIcons="R-STICK LEFT&amp;R-STICK RIGHT"
StringYes
TargetIcon

This is the name of the SVG file that should be linked to the source icon key. The name is given without the file extension, for example, the file R-STICK_1.svg would be given as:

TargetIcon="R-STICK_1"
StringYes
TargetTT

This is a localisable string that describes the action/icon. It is used as a fallback for those times when the icon cannot be displayed, and will not generally be shown in the simulation (but should still be supplied). For example:

TargetTT="TT:INPUT.GAMEPAD.ANALOGLEFT"

or

TargetTT="Analogue Left Stick"

Note that if you do not have a *.loc file or have not localised the inputs, then you can leave this blank, or - preferably - add a string with an English description. Also note that if a text description is required by the simulation for any input, then the <ButtonTT> will be used.

StringYes
    ### <ButtonTT> This is a sub-element of `` and is used to define one or more localisable strings that represent a button, axis or slider on the device being used. These strings are used in the simulation when an icon is not appropriate or hasn't been defined, and there should be *one `` for every input on the device*. For example, if the device has a joystick, you should have 4 `` for up / down / left / right, or if there is a slider, there should be two `` for slider up and slider down, etc...   It can have the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `buttonId` | This is the ID string of the button that you want to describe. | String | Yes | | `TT` | This is the description of the button. If you have a [\*.loc file](../localization/loc-files-localization/) then you can use the `TT:[string]` format, otherwise the button should be described in English. | String | Yes | {{< /table-wrapper >}}     ### SourceIcons Keys There are a number of predefined keys available to you to use to bind one or more inputs to a given icon. The tables below show the keys for the different input devices, along with the **hardware string** they are associated with. Note that there are no tables for **mouse** or **Keyboard** input, as those devices will use the default UI icons.   #### Controller (XBox One for Windows)
SourceIcons KeyInformation KeyController Input
AButton1
BButton2
XButton3
YButton4
LBButton5
RBButton6
LTAxis Z Axis Z+
RTAxis Z Axis Z-
L-STICKButton9
R-STICKButton10
BACKButton7
STARTButton8
D-PAD LEFTPOV1 POV1_LEFT
D-PAD RIGHTPOV1 POV1_RIGHT
D-PAD UPPOV1 POV1_UP
D-PAD DOWNPOV1 POV1_DOWN
L-STICK LEFTAxis X-
L-STICK RIGHTAxis X+
L-STICK UPAxis Y-
L-STICK DOWNAxis Y+
R-STICK LEFTRotation X-
R-STICK RIGHTRotation X+
R-STICK UPRotation Y-
R-STICK DOWNRotation Y+
L-STICK XAxis X
L-STICK YAxis Y
R-STICK XRotation X
R-STICK YRotation Y
    #### Xinput Controller / XBox Series Gamepad {{< table-wrapper >}} | `SourceIcons` Key | `Information` Key | |:-----------------:|:-----------------:| | 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 | {{< /table-wrapper >}}     #### XBox Series Stick {{< table-wrapper >}} | `SourceIcons` Key | `Information` Key | |:----------------------:|:------------------:| | JOYSTICK BUTTON 1 - 16 | Button1 - Button32 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {{< /table-wrapper >}}     #### XR Controller Left / XR Controller Right {{< table-wrapper >}} | `SourceIcons` Key | `Information` Key | |:---------------------:|:----------------------:| | 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 | {{< /table-wrapper >}}