Changed prompt sign to the more common $

This commit is contained in:
Ingo Ruhnke 2010-05-20 22:32:13 +02:00
parent 1e4fbbd05c
commit c82a67d83a
2 changed files with 51 additions and 51 deletions

View file

@ -218,20 +218,20 @@ might also cause trouble in some games in that the character or camera
might move without moving the stick. To fix this one has to set the
value to something higher:
\fB% xboxdrv --deadzone 4000\fR
\fB$ xboxdrv --deadzone 4000\fR
A value of 4000 works quite well for most games.
You can also give the deadzone in percentage:
\fB% xboxdrv --deadzone 15%\fR
\fB$ xboxdrv --deadzone 15%\fR
.TP
\*(T<\fB\-\-deadzone\-trigger \fR\*(T>\fINUM\fR
The left and right trigger have a separate deadzone value which can be
specified with:
.nf
\*(T<% xboxdrv \-\-deadzone\-trigger 15% \*(T>
\*(T<$ xboxdrv \-\-deadzone\-trigger 15% \*(T>
.fi
.TP
\*(T<\fB\-\-trigger\-as\-button\fR\*(T>
@ -252,11 +252,11 @@ additional analog axis.
Button remapping is available via the \*(T<\fB\-\-buttonmap\fR\*(T> option. If you want
to swap button A and B start with:
\fB% xboxdrv --buttonmap A=B,B=A\fR
\fB$ xboxdrv --buttonmap A=B,B=A\fR
If you want all face buttons send out A button events:
\fB% xboxdrv --buttonmap B=A,X=A,Y=A\fR
\fB$ xboxdrv --buttonmap B=A,X=A,Y=A\fR
Possible button names are (aliases are in parenthesis):
@ -324,13 +324,13 @@ mapping. In addition you can supply a sign to indicate that an axis
should be inverted. So if you want to invert the y1 axis start with:
.nf
\*(T<% xboxdrv \-\-axismap \-Y1=Y1\*(T>
\*(T<$ xboxdrv \-\-axismap \-Y1=Y1\*(T>
.fi
If you want to swap the left and right stick start with:
.nf
\*(T<% xboxdrv \-\-axismap X2=X1,Y2=Y1,X1=X2,Y1=Y2\*(T>
\*(T<$ xboxdrv \-\-axismap X2=X1,Y2=Y1,X1=X2,Y1=Y2\*(T>
.fi
Possible axis names are: x1, y1, x2, y2, lt, rt
@ -365,7 +365,7 @@ etc. macros the special name \fBJS_$NUM\fR, which sets the given button to
the $NUMS joystick button, i.e.:
.nf
\*(T<% xboxdrv \-\-ui\-clear \-\-ui\-buttonmap A=JS_0,B=JS_1\*(T>
\*(T<$ xboxdrv \-\-ui\-clear \-\-ui\-buttonmap A=JS_0,B=JS_1\*(T>
.fi
Note that this will only work if no other joystick
@ -375,7 +375,7 @@ You can also map a button to a \fBREL_\fR
event. In that case you can supply additional paramaters in the form of:
.nf
\*(T<% xboxdrv \-\-ui\-buttonmap X=REL_???:VALUE:REPEAT\*(T>
\*(T<$ xboxdrv \-\-ui\-buttonmap X=REL_???:VALUE:REPEAT\*(T>
.fi
\fIVALUE\fR gives the value of the event (default: 10)
@ -446,7 +446,7 @@ kernel for axes. The events that are available are the
same as for \*(T<\fB\-\-ui\-buttonmap\fR\*(T>.
.nf
\*(T<% xboxdrv \-\-ui\-axismap X1=REL_???:VALUE:REPEAT\*(T>
\*(T<$ xboxdrv \-\-ui\-axismap X1=REL_???:VALUE:REPEAT\*(T>
.fi
\fIVALUE\fR gives the maximum value of the event (default: 10)
@ -456,7 +456,7 @@ gives the number of milisecond to pass before the event
is fired again (default: 5)
.nf
\*(T<% xboxdrv \-\-ui\-axismap X1=KEY_UP:KEY_DOWN:THRESHOLD\*(T>
\*(T<$ xboxdrv \-\-ui\-axismap X1=KEY_UP:KEY_DOWN:THRESHOLD\*(T>
.fi
\fIKEY_UP\fR gives the keycode to be send when the axis is moved up
@ -475,7 +475,7 @@ buttons you can use the 'void' event:
Lets the controller act as a mouse. It is indendical to:
.nf
\*(T<% xboxdrv \e
\*(T<$ xboxdrv \e
\-\-dpad\-as\-button
\-\-deadzone 4000
\-\-trigger\-as\-zaxis
@ -537,7 +537,7 @@ character instead of your viewpoint.
\*(T<\fB\-\-axis\-sensitivty \fR\*(T>\fIAXIS=SENSITIVITY\fR,...
The sensitive of an axis can be adjusted via --axis-sensitivty:
\fB% xboxdrv --axis-sensitivty X1=-2.0,Y1=-2.0\fR
\fB$ xboxdrv --axis-sensitivty X1=-2.0,Y1=-2.0\fR
A value of 0 gives you the default linear sensitivity, values larger
then 0 will give you heigher sensitivity, while values smaller then 0
@ -563,24 +563,24 @@ for flightsim games.
Since the axis might be upside down, you might want to use
the \*(T<\fB\-\-axismap\fR\*(T> function to reverse it.
\fB% xboxdrv --relative-axis y2=64000 --axismap -y2=y2\fR
\fB$ xboxdrv --relative-axis y2=64000 --axismap -y2=y2\fR
.TP
\*(T<\fB\-\-autofire BUTTON=FREQUENCY\fR\*(T>
Autofire mapping allows you to let a button automatically fire with a
given frequency in miliseconds:
\fB% xboxdrv --autofire A=250\fR
\fB$ xboxdrv --autofire A=250\fR
Combining \*(T<\fB\-\-autofire\fR\*(T> with button map allows you to have one button act
as autofire while another one, emitting the same signal, acts normally.
\fB% xboxdrv --autofire B=250 --buttonmap B=A\fR
\fB$ xboxdrv --autofire B=250 --buttonmap B=A\fR
.TP
\*(T<\fB\-\-calibration \fR\*(T>\fICALIBRATIONSPEC\fR
If your gamepad for some reason can't reach the maximum value or isn't
centered properly you can fix that via the calibration options:
\fB% xboxdrv --calibration X2=-32768:0:32767\fR
\fB$ xboxdrv --calibration X2=-32768:0:32767\fR
X2 is the axis name and the three values that follow are min, center
and max. Simply insert the values that jstest reports when your axis
@ -597,7 +597,7 @@ stick is only moved half the way.
\*(T<\fB\-\-axis\-sensitivty \fR\*(T>\fIAXIS=SENSITIVITY\fR,...
The sensitive of an axis can be adjusted via --axis-sensitivty:
\fB% xboxdrv --axis-sensitivty X1=-2.0,Y1=-2.0\fR
\fB$ xboxdrv --axis-sensitivty X1=-2.0,Y1=-2.0\fR
A value of 0 gives you the default linear sensitivity, values larger
then 0 will give you heigher sensitivity, while values smaller then 0
@ -632,7 +632,7 @@ to get rid of.
You can change the rumble strength via:
.nf
\*(T<% xboxdrv \-\-rumble\-gain 50%\*(T>
\*(T<$ xboxdrv \-\-rumble\-gain 50%\*(T>
.fi
Values larger then 100% are possible as well.
@ -640,7 +640,7 @@ Values larger then 100% are possible as well.
Plug in your Xbox360 gamepad and then unload the xpad driver via:
.PP
.nf
\*(T<% rmmod xpad\*(T>
\*(T<$ rmmod xpad\*(T>
.fi
.PP
If you want to permanently unload it add the following line to
@ -667,14 +667,14 @@ Once ensured that xpad is out of the way and everything is in place
start the userspace driver with:
.PP
.nf
\*(T<% xboxdrv\*(T>
\*(T<$ xboxdrv\*(T>
.fi
.PP
Or in case you don't have the neccesary rights (being in group root
should often be enough) start the driver as root via:
.PP
.nf
\*(T<% sudo xboxdrv\*(T>
\*(T<$ sudo xboxdrv\*(T>
.fi
.PP
This will create /dev/input/js0 and allow you to access the gamepad
@ -683,7 +683,7 @@ If you have multiple wired controllers you need to start multiple instances
of the xboxdrv driver and append the -i argument like this:
.PP
.nf
\*(T<% xboxdrv \-i 1\*(T>
\*(T<$ xboxdrv \-i 1\*(T>
.fi
.PP
If you have multiple wireless controller you need to start multiple
@ -691,7 +691,7 @@ instances of the xboxdrv driver and append the --wid argument like
this:
.PP
.nf
\*(T<% xboxdrv \-\-wid 1\*(T>
\*(T<$ xboxdrv \-\-wid 1\*(T>
.fi
.PP
You have to sync the wireless controller as usual.
@ -700,14 +700,14 @@ This will then use the second detected controller, see to see which id
your controller has:
.PP
.nf
\*(T<% xboxdrv \-\-list\-controller\*(T>
\*(T<$ xboxdrv \-\-list\-controller\*(T>
.fi
.PP
When everything works as expected it is recomment that you run xboxdrv
with the silent option:
.PP
.nf
\*(T<% xboxdrv \-\-silent\*(T>
\*(T<$ xboxdrv \-\-silent\*(T>
.fi
.PP
This will suppress the logging of events to the console and will
@ -717,7 +717,7 @@ If you want to abuse the led or rumble of the gamepad for notification
in scripts you can do see via:
.PP
.nf
\*(T<% xboxdrv \-\-led 10 \-\-rumble 30,30 \-\-quit\*(T>
\*(T<$ xboxdrv \-\-led 10 \-\-rumble 30,30 \-\-quit\*(T>
.fi
.PP
This will cause a mild rumble and the led to rotate, you can stop it
@ -725,7 +725,7 @@ again via, which also happens to be the command you can use to stop
your Xbox360 controller from blinking:
.PP
.nf
\*(T<% xboxdrv \-\-\-led 0 \-\-rumble 0,0 \-\-quit\*(T>
\*(T<$ xboxdrv \-\-\-led 0 \-\-rumble 0,0 \-\-quit\*(T>
.fi
.PP
For rumble to work make sure you have connected the
@ -761,7 +761,7 @@ environment variables.
Currently available via:
.PP
.nf
\*(T<% svn co svn://svn.berlios.de/windstille/trunk/sdl\-jstest\*(T>
\*(T<$ svn co svn://svn.berlios.de/windstille/trunk/sdl\-jstest\*(T>
.fi
.SS XEV
xev lets you see the events that Xorg sees. Note however that you
@ -771,7 +771,7 @@ manager before they reach xev, this is normal.
xev is part of every Linux distribution, on Ubuntu its available via:
.PP
.nf
\*(T<% apt\-get install x11\-utils\*(T>
\*(T<$ apt\-get install x11\-utils\*(T>
.fi
.SS JSCALC
Do not use this tool, for current day joysticks it doesn't do
@ -789,7 +789,7 @@ keyboard, like Flash games or games that don't support a joystick, you
have to adjust the keybindings to fit the game:
.PP
.nf
\*(T<% xboxdrv \e
\*(T<$ xboxdrv \e
\-\-ui\-clear \e
\-\-dpad\-as\-button \e
\-\-ui\-buttonmap a=XK_a,b=XK_b,x=XK_x,y=XK_y \e
@ -799,7 +799,7 @@ have to adjust the keybindings to fit the game:
Start \fBxboxdrv\fR with:
.PP
.nf
\*(T<% xboxdrv \-\-trigger\-as\-button \-s \*(T>
\*(T<$ xboxdrv \-\-trigger\-as\-button \-s \*(T>
.fi
.PP
The triggers are not regonized in these games when they
@ -812,7 +812,7 @@ attacks). Instead of using the native button names, the
1,2,3,... aliases are used, which makes things easier to edit:
.PP
.nf
\*(T<% xboxdrv \-\-dpad\-only \e
\*(T<$ xboxdrv \-\-dpad\-only \e
\-\-trigger\-as\-button \e
\-\-buttonmap lb=1,x=2,y=3,lt=4,a=5,b=6,rb=1,rb=2,rb=3,rt=4,rt=5,rt=6\*(T>
.fi
@ -827,7 +827,7 @@ joysticktype = ch\*(T>
Start xboxdrv with:
.PP
.nf
\*(T<% xboxdrv \-s \e
\*(T<$ xboxdrv \-s \e
\-\-trigger\-as\-zaxis \-\-square\-axis \e
\-\-relative\-axis y2=64000 \-\-axismap \-y2=x2,x2=y2\*(T>
.fi
@ -841,7 +841,7 @@ incomplete example, not a perfectly playable configuration,
you have to do tweaking yourself.
.PP
.nf
\*(T<% xboxdrv \e
\*(T<$ xboxdrv \e
\-\-ui\-axismap x2=REL_X:10,y2=REL_Y:\-10,x1=KEY_LEFT:KEY_RIGHT,y1=KEY_UP:KEY_DOWN \e
\-\-ui\-buttonmap a=BTN_RIGHT,b=BTN_LEFT,x=BTN_EXTRA \e
\-\-ui\-buttonmap rb=KEY_5,lb=KEY_6,lt=BTN_LEFT,rt=BTN_RIGHT \e
@ -853,7 +853,7 @@ Note: This is just an incomplete example, not a perfectly playable
configuration, you have to do tweaking yourself.
.PP
.nf
\*(T<% xboxdrv \e
\*(T<$ xboxdrv \e
\-\-ui\-axismap x2=REL_X:10,y2=REL_Y:\-10,x1=KEY_A:KEY_D,y1=KEY_W:KEY_S \e
\-\-ui\-buttonmap a=KEY_LEFTSHIFT,b=BTN_C,x=BTN_EXTRA,y=KEY_C \e
\-\-ui\-buttonmap lb=BTN_RIGHT,rb=KEY_SPACE \e
@ -946,7 +946,7 @@ tools/ subdirectory). Or in case you want just see if your driver is
working correctly you can pass the -v option:
.PP
.nf
\*(T<% xboxdrv \-v\*(T>
\*(T<$ xboxdrv \-v\*(T>
.fi
.PP
This will cause the driver to output all the events that it received
@ -960,7 +960,7 @@ Before reporting this as a bug make sure you have tested if the driver
itself works with:
.PP
.nf
\*(T<% xboxdrv \-\-no\-uinput \-v\*(T>
\*(T<$ xboxdrv \-\-no\-uinput \-v\*(T>
.fi
.SS "THE WIRELESS CONTROLLER DOESN'T WORK"
You have to sync the controller befor it can be used, restart of the
@ -1000,13 +1000,13 @@ is the recommont one.
Get the device id from hal:
.PP
.nf
\*(T<% hal\-find\-by\-property \-\-key 'info.product' \-\-string 'Xbox Gamepad (userspace driver)'\*(T>
\*(T<$ hal\-find\-by\-property \-\-key 'info.product' \-\-string 'Xbox Gamepad (userspace driver)'\*(T>
.fi
.PP
Then remove the device from hal with:
.PP
.nf
\*(T<% hal\-device \-r $DEVICEID\*(T>
\*(T<$ hal\-device \-r $DEVICEID\*(T>
.fi
.SS "TEMPORARY WORKAROUND USING XINPUT"
Second workaround works with xinput:
@ -1058,7 +1058,7 @@ A temporary workaround for this is to simply delete the joystick
device js0 and replace it with a symbolic link js1 via:
.PP
.nf
\*(T<% sudo ln \-sf /dev/input/js1 /dev/input/js0\*(T>
\*(T<$ sudo ln \-sf /dev/input/js1 /dev/input/js0\*(T>
.fi
.PP
This workaround will only last till the next reboot, since the device

View file

@ -868,8 +868,8 @@ pos = (1.0f - (1.0f - pos) ** t) ** (1 / t);]]></programlisting>
you the <filename>/dev/input/jsX</filename> device:
</para>
<programlisting><![CDATA[% modprobe uinput
% modprobe joydev]]></programlisting>
<programlisting><![CDATA[$ modprobe uinput
$ modprobe joydev]]></programlisting>
<para>
You also have to make sure that you have access rights to
@ -1141,16 +1141,16 @@ joysticktype = ch]]></programlisting>
</para>
<programlisting><![CDATA[
% SDL_LINUX_JOYSTICK="'Xbox Gamepad (userspace driver)' 6 1 0"
% export SDL_LINUX_JOYSTICK]]></programlisting>
$ SDL_LINUX_JOYSTICK="'Xbox Gamepad (userspace driver)' 6 1 0"
$ export SDL_LINUX_JOYSTICK]]></programlisting>
<para>
You might also need in addition use this (depends on the way SDL was compiled):
</para>
<programlisting><![CDATA[
% SDL_JOYSTICK_DEVICE="/dev/input/js0"
% export SDL_JOYSTICK_DEVICE]]></programlisting>
$ SDL_JOYSTICK_DEVICE="/dev/input/js0"
$ export SDL_JOYSTICK_DEVICE]]></programlisting>
<para>
This will let the DPad act as Hat in SDL based application. For
@ -1203,7 +1203,7 @@ joysticktype = ch]]></programlisting>
and the idProduct numbers, which you can find out via:
</para>
<programlisting><![CDATA[% lsusb -v]]></programlisting>
<programlisting><![CDATA[$ lsusb -v]]></programlisting>
<para>Once done you can try to add them to this array in <filename>xpad_device.cpp</filename>:</para>
@ -1235,7 +1235,7 @@ joysticktype = ch]]></programlisting>
of:
</para>
<programlisting><![CDATA[% lsusb -v]]></programlisting>
<programlisting><![CDATA[$ lsusb -v]]></programlisting>
<para>Along with all the "Unknown data" lines you get. </para>
</refsect2>
@ -1343,8 +1343,8 @@ joysticktype = ch]]></programlisting>
Second workaround works with xinput:
</para>
<programlisting><![CDATA[% xinput list
% xinput set-int-prop $DEVICEID 'Device Enabled' 32 0]]></programlisting>
<programlisting><![CDATA[$ xinput list
$ xinput set-int-prop $DEVICEID 'Device Enabled' 32 0]]></programlisting>
</refsect2>
<refsect2>