Current Versions: |
XD-Profile - 1.01 (supporting Dhauzimmer X362.105 [a and
b]) |
PD-Profile - 1.01 (supporting Dhauzimmer
P8K1.100) |
![]() |
This page describes both the expected format of a .xdp file, and a detailed listing of all the keywords recognized by the script interpreter to generate keystrokes, mouse movement or buttons, DirectX buttons, etc.
First note that the .bpf converter in XD-Profile ignores all blank lines, and lines where the first non-whitespace character is a '#' (pound) character.
Each .xdp file has an expected order of keywords that MUST exist in the file. This includes four sections, marked by (and listed here in order) "<HEADER>", "<SCRIPTLIST>", "<AXIS_CHAINS>", and "<PROGRAM_MODES>".
DEFAULT_PRESS_DELAY=xx DEFAULT_PRESS_DELAY=xx
xx can be any integer value between 1 and 2^32. The DEFAULT_PRESS_DELAY sets the default delay between all keyboard/directX/mouse-button presses and the previous event. The DEFAULT_RELEASE_DELAY sets the default delay between all keyboard/directX/mouse-button releases and the previous event. Note that due to the way the drivers handle events, if events are timed too closely the order in which they are processed may get jumbled, and some may even be skipped altogether. If you are experiencing problems with your profile try increasing the delays to above 100 ms and see if the problem is alleviated.
E.g. The following HEADER content and script entry (see below) for "cmd1" will result in the "a" key being pressed 200 ms after the button it is assigned to is pressed, held for 800 ms, the "b" key being pressed 200 ms later, and then released after 500 ms.
<HEADER> DEFAULT_PRESS_DELAY=200 DEFAULT_PRESS_DELAY=800 <SCRIPTLIST> cmd1 a A b B^500
Scripts take the format "scriptname (event list)", where scriptname is any original alphanumeric name that does not include any of [](){}<>#=^+-, including (space). (event list) is a list of keywords that the script interpreter recognizes. Note that an empty event list is legal. All of the recognized keywords are listed in table 1 below. For each keyword in the event list you may add a suffix in the form "^xx where xx is a number between 0 and 2^32. The suffix number represents the delay in ms between the previous event and the event the suffix is attached to. If no suffix is entered, or a zero suffix is attached, the default delays set in the HEADER section are used.
In addition to the event keywords in table 1, there is also an event keyword to load a new mode. This event has the syntax "LOADMODE_modename" where modename is the name you have given to one of the modes (see the <PROGRAM_MODES> section below.
E.g. The following creates a script entry called "cmd1" that generates a press of the "a" key, 500 ms later a release of the "a" key, then loads "mode1", and finally 500 ms later loads the DEFAULT mode.
cmd1 a A^500 LOADMODE_mode1 LOADMODE_DEFAULT^500
As of version 0.95, the following keywords were added to control the speed of
the mouse cursor in the x/y axis.
MOUSELEFT_xx, MOUSERIGHT_xx, MOUSEUP_xx, MOUSEDOWN_xx xx is an integer representing the speed in pixels the cursor will move each time Windows polls the mouse. Values between 0 and 20 are recommended.
An expected setup of a Hat to control the mouse would look like the following:
<SCRIPTLIST> mousedown MOUSEDOWN_5 mouseleft MOUSELEFT_5 mouseright MOUSERIGHT_5 mousestop MOUSERIGHT_0 MOUSEUP_0 mouseup MOUSEUP_5 <PROGRAM_MODES> [DEFAULT] HatUpPress = mouseup HatRightPress = mouseright HatDownPress = mousedown HatLeftPress = mouseleft HatCenterPress = mousestop {DEFAULT}
The .bpf converter will continue to read scripts until the AXIS_CHAINS section is found.
Table 1: Script Interpreter Recognized
Keywords |
KEY |
PRESS KEYWORD |
RELEASE KEYWORD |
characters 'a' .. 'z' |
a .. z | A .. Z |
numbers '0' .. '9' |
0 .. 9 | _0 .. _9 |
function keys 'f1' .. 'f12' |
f1 .. f12 | F1 .. F12 |
Return |
return | RETURN |
Escape |
escape | ESCAPE |
Backspace |
backspace | BACKSPACE |
Tab |
tab | TAB |
Space |
space | SPACE |
'+' character |
plus | PLUS |
'-' character |
minus | MINUS |
'[ character' |
lbracket | LBRACKET |
']' character |
rbracket | RBRACKET |
'\' character |
backslash | BACKSLASH |
';' character |
semicolon | SEMICOLON |
''' (apostrophe) character |
apostrophe | APOSTROPHE |
'~' (tilde) character |
tilde | TILDE |
',' character |
comma | COMMA |
'.' character |
period | PERIOD |
'/' character |
forwardslash | FORWARDSLASH |
Caps Lock |
capslock | CAPSLOCK |
Print Screen |
printscreen | PRINTSCREEN |
Scroll Lock |
scrolllock | SCROLLLOCK |
Pause |
pause | PAUSE |
Insert |
insert | INSERT |
Home |
home | HOME |
Page Up |
pageup | PAGEUP |
Delete |
delete | DELETE |
End |
end | END |
Page Down |
pagedown | PAGEDOWN |
Right Arrow |
rightarrow | RIGHTARROW |
Left Arrow |
leftarrow | LEFTARROW |
Down Arrow |
downarrow | DOWNARROW |
Up Arrow |
uparrow | UPARROW |
Keypad Num Lock |
kp_numlock | KP_NUMLOCK |
Keypad '/' |
kp_forwardslash | KP_FORWARDSLASH |
Keypad '*' |
kp_asterisk | KP_ASTERISK |
Keypad '-' |
kp_minus | KP_MINUS |
Keypad '+' |
kp_plus | KP_PLUS |
Keypad Enter |
kp_enter | KP_ENTER |
Keypad '0' .. '9' |
kp_0 .. kp_9 | KP_0 .. KP_9 |
Keypad Period |
kp_period | KP_PERIOD |
Left Control |
lcontrol or control | LCONTROL or CONTROL |
Left Shift |
lshift or shift | LSHIFT or SHIFT |
Left Alt |
lalt or alt | LALT or ALT |
Right Control |
rcontrol | RCONTROL |
Right Shift |
rshift | RSHIFT |
Right Alt |
ralt | RALT |
DirectX Button 1 .. 64 |
dx_1 .. dx_64 | DX_1 .. DX_64 |
Left Mouse Button |
mouse1 | MOUSE1 |
Right Mouse Button |
mouse2 | MOUSE2 |
Middle Mouse Button |
mouse3 | MOUSE3 |
Windows Hat Center |
hat_center | n/a |
Windows Hat Up |
hat_up | n/a |
Windows Hat Up-Right |
hat_upright | n/a |
Windows Hat Right |
hat_right | n/a |
Windows Hat Down-Right |
hat_downright | n/a |
Windows Hat Down |
hat_down | n/a |
Windows Hat Down-Left |
hat_downleft | n/a |
Windows Hat Left |
hat_left | n/a |
Windows Hat Up-Left |
hat_upleft | n/a |
Each chain you identify is marked by a "[chainname]" tag, where chainname is any original alphanumeric name that does not include any of [](){}<>#=^, including (space). After identifying a chain, you identify the breakpoints for the chain using a breakpoint list. Breakpoint lists take the format "(startrange : stoprange ; count) (+ inccmd - deccmd). Note the parentheses, colon, semi-colon, plus, and minus symbol that segregate the identifiers. The meanings and valid values of each identifier are listed below.
Table 2: Axis Minimum and Maximum
Locations |
AXIS |
MINIMUM |
MAXIMUM |
X Axis |
full left deflection |
full right deflection |
Y Axis |
full forward deflection |
full backward deflection |
X Axis |
full left deflection |
full right deflection |
Throttle Axis (Z) |
full forward |
full back |
Rudder Axis (R) |
full left deflection |
full right deflection |
Rotary 1 Axis (R1) |
top-side rolled full left |
top-side rolled full right |
Rotary 2 Axis (R2) |
top-side rolled full left |
top-side rolled full
right |
A chain may be constructed of up to 255 breakpoints. Breakpoint lists are continuously read until the end of the chain is marked by "{chainname}".
E.g. The following establishes a chain that issues 20 "cmd1" scripts equally spaced when increasing above zero, and 10 "cmd2" scripts equally spaced when decreasing below zero.
[chain1] (0 : 32767 ; 20) (+cmd1 -) (-32767 : 0 ; 10) (+ -cmd2) {chain1}
The .bpf converter will continue to read chains until the PROGRAM_MODES section is found.
After identifying a mode, you identify frobbable and axis assignments using the syntax "frobbable = scriptname" or "axis = chainname", where frobbable is any one of the pre-defined frobbables listed in table 3 below, scriptname is any one of the script names identified in the SCRIPTLIST section, axis is any one of the pre-defined axis names listed in table 4 below, and chainname is any one of the chain names identified in the AXIS_CHAINS section.
E.g. The following issues "cmd1" when the trigger is pressed, "cmd2" when the trigger is released, and assigns "chain1" to the rudder axis.
TriggerPress = cmd1 TriggerRelease = cmd2 RAxis = chain1
It is important to note that for frobbables that are not listed in a mode, their assignment status does not change when modes change. If TriggerPress was assigned to "cmd1" in the default mode, and then mode 2 was loaded which did NOT include an entry for TriggerPress, TriggerPress would still issue "cmd1" in mode 2. Herein lies the importance of using a NULL command entry if you want a frobbable to issue a script in one mode, but do nothing in another. A NULL command is simply a script containing an empty event list which is then assigned to the frobbables that should do nothing. The same can be created for chains. An equivalent NULL chain is a chain without breakpoints.
The end of each mode and it's assignments is marked by "{modename}". The .bpf converter will continue to read modes until the end-of-file is found.
Table 3: Pre-Defined
Frobbables |
TriggerPress | TriggerRelease |
LaunchPress | LaunchRelease |
FireAPress | FireARelease |
FireBPress | FireBRelease |
FireCPress | FireCRelease |
FireDPress | FireDRelease |
ShiftPress | ShiftRelease |
MouseButtonPress | MouseButtonRelease |
Mode1Press | Mode1Release |
Mode2Press | Mode2Release |
Mode3Press | Mode3Release |
Aux1Press | Aux1Release |
Aux2Press | Aux2Release |
Aux3Press | Aux3Release |
StickHat1CenterPress | StickHat1CenterRelease |
StickHat1UpPress | StickHat1UpRelease |
StickHat1UpRightPress | StickHat1UpRightRelease |
StickHat1RightPress | StickHat1RightRelease |
StickHat1DownRightPress | StickHat1DownRightRelease |
StickHat1DownPress | StickHat1DownRelease |
StickHat1DownLeftPress | StickHat1DownLeftRelease |
StickHat1LeftPress | StickHat1LeftRelease |
StickHat1UpLeftPress | StickHat1UpLeftRelease |
StickHat2CenterPress | StickHat2CenterRelease |
StickHat2UpPress | StickHat2UpRelease |
StickHat2UpRightPress | StickHat2UpRightRelease |
StickHat2RightPress | StickHat2RightRelease |
StickHat2DownRightPress | StickHat2DownRightRelease |
StickHat2DownPress | StickHat2DownRelease |
StickHat2DownLeftPress | StickHat2DownLeftRelease |
StickHat2LeftPress | StickHat2LeftRelease |
StickHat2UpLeftPress | StickHat2UpLeftPress |
ThrottleHat1CenterPress | ThrottleHat1CenterRelease |
ThrottleHat1UpPress | ThrottleHat1UpRelease |
ThrottleHat1UpRightPress | ThrottleHat1UpRightRelease |
ThrottleHat1RightPress | ThrottleHat1RightRelease |
ThrottleHat1DownRightPress | ThrottleHat1DownRightRelease |
ThrottleHat1DownPress | ThrottleHat1DownRelease |
ThrottleHat1DownLeftPress | ThrottleHat1DownLeftRelease |
ThrottleHat1LeftPress | ThrottleHat1LeftRelease |
ThrottleHat1UpLeftPress | ThrottleHat1UpLeftRelease |
MouseHatCenterPress | MouseHatCenterRelease |
MouseHatUpPress | MouseHatUpRelease |
MouseHatUpRightPress | MouseHatUpRightRelease |
MouseHatRightPress | MouseHatRightRelease |
MouseHatDownRightPress | MouseHatDownRightRelease |
MouseHatDownPress | MouseHatDownRelease |
MouseHatDownLeftPress | MouseHatDownLeftRelease |
MouseHatLeftPress | MouseHatLeftRelease |
MouseHatUpLeftPress | MouseHatUpLeftRelease |
Table 4: Pre-Defined Axis
Names |
XAxis |
YAxis |
ZAxis |
RAxis |
R1Axis |
R2Axis |
XD-Profile, PD-Profile, and
http://XDProfile.freebirdsWing.org are authored by Mike "Mitch" Houghton, Copyright
2002 |