Some example scripts and test scripts
This commit is contained in:
parent
fbf8b29b05
commit
420176ddd4
9 changed files with 145 additions and 5 deletions
31
examples/dosbox.xboxdrv
Normal file
31
examples/dosbox.xboxdrv
Normal file
|
@ -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 #
|
||||
|
|
@ -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 #
|
||||
|
|
57
examples/rotate.xboxdrv
Normal file
57
examples/rotate.xboxdrv
Normal file
|
@ -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 #
|
7
test/invalid-section-name.xboxdrv
Normal file
7
test/invalid-section-name.xboxdrv
Normal file
|
@ -0,0 +1,7 @@
|
|||
# an invalid configuration that should produce errors when parsed by
|
||||
# xboxdrv
|
||||
|
||||
[invalid-random-section-name]
|
||||
invalid-variable = random-value
|
||||
|
||||
# EOF #
|
8
test/invalid-variable-name-ui-buttonmap.xboxdrv
Normal file
8
test/invalid-variable-name-ui-buttonmap.xboxdrv
Normal file
|
@ -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 #
|
7
test/invalid-variable-name.xboxdrv
Normal file
7
test/invalid-variable-name.xboxdrv
Normal file
|
@ -0,0 +1,7 @@
|
|||
# an invalid configuration that should produce errors when parsed by
|
||||
# xboxdrv
|
||||
|
||||
[xboxdrv]
|
||||
invalid-variable = random-value
|
||||
|
||||
# EOF #
|
8
test/xboxdrv-daemon.sh
Normal file
8
test/xboxdrv-daemon.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
xboxdrv --daemon \
|
||||
--next-controller \
|
||||
|
||||
"$@"
|
||||
|
||||
# EOF #
|
9
test/xboxdrv-device-naming3.sh
Executable file
9
test/xboxdrv-device-naming3.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
./xboxdrv --daemon \
|
||||
`# regular Xbox360 controller gets flightstick threatment` \
|
||||
--next-controller \
|
||||
--next-controller \
|
||||
"$@"
|
||||
|
||||
# EOF #
|
4
test/xboxdrv-multi-sections.xboxdrv
Normal file
4
test/xboxdrv-multi-sections.xboxdrv
Normal file
|
@ -0,0 +1,4 @@
|
|||
[controller0/config0/modifier]
|
||||
|
||||
|
||||
# EOF #
|
Loading…
Reference in a new issue