diff --git a/examples/dosbox.xboxdrv b/examples/dosbox.xboxdrv new file mode 100644 index 0000000..dcc2f16 --- /dev/null +++ b/examples/dosbox.xboxdrv @@ -0,0 +1,31 @@ +# CH Flightstick Emulation +# ======================== +# +# This configuration is for old flight simulations in Dosbox. First +# you have to adjust your Dosbox configuration to interpreted the +# given joystick as CH Flightstick. To do so set in "dosbox.conf": +# +# [joystick] +# joysticktype = ch +# +# With the following configuration your right analog stick will act as +# trottle control, the trigger as rudder. The left stick will be +# expanded to a square movement range and the rest of the buttons acts +# as usual. +# +# For a proper experience you might want to map some of the remaining +# buttons to game specific keyboard keys. + +[xboxdrv] +trigger-as-zaxis = true +square-axis = true + +[relative-axis] +y2 = 64000 + +[axismap] +-y2=x2 +x2=y2 + +# EOF # + \ No newline at end of file diff --git a/examples/mouse.xboxdrv b/examples/mouse.xboxdrv index e75a1da..ec7e4e6 100644 --- a/examples/mouse.xboxdrv +++ b/examples/mouse.xboxdrv @@ -1,9 +1,20 @@ +# Mouse Emulation +# =============== +# +# This configuration file emulates a mouse. The left stick controls +# the cursor, the right stick becomes a horizontal and vertical scroll +# wheel, the dpad acts as cursor keys, the start and back buttons +# become forward and back buttons, the guide button escape and LB and +# RB become page up and page down and the face button act as mouse +# button. + [xboxdrv] -deadzone=4000 -trigger-as-zaxis=true -dpad-as-button=true +deadzone=4000 # to avoid cursor jitter we use a deadzone +trigger-as-zaxis=true # both triggers acts as single axis +dpad-as-button=true # easier to map the dpad as buttons [axismap] +# if we don't invert some axis things would be upside down -y2=y2 -trigger=trigger @@ -32,7 +43,5 @@ dd=KEY_DOWN start=KEY_FORWARD back=KEY_BACK guide=KEY_ESC -tl=void -tr=void # EOF # diff --git a/examples/rotate.xboxdrv b/examples/rotate.xboxdrv new file mode 100644 index 0000000..da8369f --- /dev/null +++ b/examples/rotate.xboxdrv @@ -0,0 +1,57 @@ +# Rotate the left stick +# ===================== +# +# This example install multiple configurations, each with the left +# stick rotated by 45, thus pressing the guide button will result in +# the stick movement being shifted by 45 degree each time. +# +# This is mostly for fun, but can be used to remap the controls in +# some isometric games from the dialogonals to straight axis. See also +# dpad-rotation for a similar effect done to the dpad. + +[modifier] +rotate = X1:Y1:45 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:90 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:135 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:180 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:225 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:270 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:315 + +[xboxdrv] +next=true + +[modifier] +rotate = X1:Y1:0 + +# EOF # diff --git a/test/invalid-section-name.xboxdrv b/test/invalid-section-name.xboxdrv new file mode 100644 index 0000000..be4de72 --- /dev/null +++ b/test/invalid-section-name.xboxdrv @@ -0,0 +1,7 @@ +# an invalid configuration that should produce errors when parsed by +# xboxdrv + +[invalid-random-section-name] +invalid-variable = random-value + +# EOF # diff --git a/test/invalid-variable-name-ui-buttonmap.xboxdrv b/test/invalid-variable-name-ui-buttonmap.xboxdrv new file mode 100644 index 0000000..735c60a --- /dev/null +++ b/test/invalid-variable-name-ui-buttonmap.xboxdrv @@ -0,0 +1,8 @@ +# an invalid configuration that should produce errors when parsed by +# xboxdrv + +[ui-axismap] +rtl = random-value +invalid-variable = random-value + +# EOF # diff --git a/test/invalid-variable-name.xboxdrv b/test/invalid-variable-name.xboxdrv new file mode 100644 index 0000000..785fb61 --- /dev/null +++ b/test/invalid-variable-name.xboxdrv @@ -0,0 +1,7 @@ +# an invalid configuration that should produce errors when parsed by +# xboxdrv + +[xboxdrv] +invalid-variable = random-value + +# EOF # diff --git a/test/xboxdrv-daemon.sh b/test/xboxdrv-daemon.sh new file mode 100644 index 0000000..ff1e80f --- /dev/null +++ b/test/xboxdrv-daemon.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +xboxdrv --daemon \ + --next-controller \ + + "$@" + +# EOF # diff --git a/test/xboxdrv-device-naming3.sh b/test/xboxdrv-device-naming3.sh new file mode 100755 index 0000000..5dcd54c --- /dev/null +++ b/test/xboxdrv-device-naming3.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +./xboxdrv --daemon \ + `# regular Xbox360 controller gets flightstick threatment` \ + --next-controller \ + --next-controller \ + "$@" + +# EOF # diff --git a/test/xboxdrv-multi-sections.xboxdrv b/test/xboxdrv-multi-sections.xboxdrv new file mode 100644 index 0000000..e63485c --- /dev/null +++ b/test/xboxdrv-multi-sections.xboxdrv @@ -0,0 +1,4 @@ +[controller0/config0/modifier] + + +# EOF #