2010-05-05xboxdrv10.4.120.4.12User Commandsxboxdrvxboxdrv
A Xbox/Xbox360 gamepad driver that works in userspace
xboxdrvDESCRIPTIONGeneral Options, Display help text and exit.-V, --version
Print the version number and exit.
,
Print verbose messages.
--help-led
List possible values for the led.
--help-devices
List supported devices.
-s, --silent
Do not display events on console.
--quiet
Do not display startup text.
,
List available controllers on the system.
List supported devices (used by xboxdrv-daemon.py).
List supported devices in xpad.c style.
,
map rumbling to LT and RT (for testing only)
Do not try to start uinput event dispatching, useful for debugging.
Causes xboxdrv to use the same axis and button names as the xpad kernel driver.
,
Run as daemon. In most situations this is not very
useful, as xboxdrv will fail when the
pad is removed or plugged in. See xboxdrv-daemon(1) for
a way to launch xboxdrv
automatically.
Device Options-i, --id N
Use controller with id N (default: 0).
, N
Use wireless controller with wid N (default: 0).
BUS:DEV
Use device BUS:DEV, do not do any scanning
VENDOR:PRODUCT
Use device that matches VENDOR:PRODUCT (as returned by lsusb)
TYPE
Ignore autodetection and enforce the controller type. Possible values for TYPE:
xboxxbox-matxbox360xbox360-wirelessxbox360-guitarStatus Options
set LED status, see --list-led-values (default: 0)
NUM
Set LED status. Possible values for NUM are:
NumBehaviour0 off1 all blinking2 1/top-left blink, then on3 2/top-right blink, then on4 3/bottom-left blink, then on5 4/bottom-right blink, then on6 1/top-left on7 2/top-right on8 3/bottom-left on9 4/bottom-right on10 rotate11 blink12 blink slower13 rotate with two lights14 blink15 blink once
, L,R
Set the speed for both rumble motors. Values from 0 to 255 are accepted, the default is 0,0.
Configuration Options
The deadzone is the area at which the sticks do not report any
events. The default is zero, which gives the best sensitifity but
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:
% xboxdrv --deadzone 4000A value of 4000 works quite well for most games.You can also give the deadzone in percentage:% xboxdrv --deadzone 15%
The left and right trigger have a separate deadzone value which can be
specified with:
% xboxdrv --deadzone-trigger 15% LT and RT send button instead of axis eventsCombine LT and RT to form a zaxis instead
The DPad sends button instead of axis events.
Both sticks are ignored, only the DPad sends out axis
events. Useful for games that might get confused by
additional analog axis.
Button remapping is available via the option. If you want
to swap button A and B start with:
% xboxdrv --buttonmap A=B,B=AIf you want all face buttons send out A button events:% xboxdrv --buttonmap B=A,X=A,Y=APossible button names are (aliases are in parenthesis):
NameDescriptionstart, backstart, back buttonsguidebig X-button in the middle (Xbox360 only)a(1), b(2), x(3), y(4)face buttonsblack, whiteblack, white buttons (Xbox1 only, mapped to lb, rb on Xbox360)lb(5), rb(6)shoulder buttons (Xbox360 only, mapped to black, white on Xbox1)lt(7), rt(8)analog trigger (needs --trigger-as-button option)tl, trpressing the left or right analog stickdu(up), dd(down), dl(left), dr(right)dpad directions (needs --dpad-as-button option)green, red, yellow, blue, orangeguitar buttons
Axis remapping is available via --axismap and works the same as button
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:
% xboxdrv --axismap -Y1=Y1
If you want to swap the left and right stick start with:
% xboxdrv --axismap X2=X1,Y2=Y1,X1=X2,Y1=Y2
Possible axis names are: x1, y1, x2, y2, lt, rt
Swaping lt or rt with x1, y1, x2, y2 will not work properly, since
their range is different.
BUTTON=UIBUTTONSPEC,
AXIS=UIAXISSPEC
Another more low level form to remap buttons and axis
comes in the form of --ui-buttonmap and --ui-axismap,
these allow you to change the event code that is send to
the kernel for a given button or axis. Usage is similar to
the normal button mapping:
% xboxdrv -s --ui-buttonmap X=KEY_A
Except that the right hand side is an event name from
/usr/include/linux/input.h. You can
use all KEY_ or BTN_
codes for
and all ABS_ and REL_ ones
for .
Instead of the low level KEY_ names, which represent keycodes, you can
also use the higher level X11 keysyms XK_, the keysyms have the
advantage that they map directly to the key you expect, while a KEY_
name gets mungled by the X11 keymap and will often not report what you
expect in case you use a keymap that is different then your keyboard
(i.e. dvorak on a qwerty keyboard).
A full list of X11 keysyms is available at
/usr/include/X11/keysymdef.h, note that you can only use those that
are reachable by your current keymap. Keysyms that are reachable via
multiple keycodes might break the mapping from keysym to evdev code.
When you try to let a gamepad key send a keyboard events
Xorg must register it as keyboard device to work
properly. This seems to work automatically when you bind
more then two keyboard keys, if you bind less you need
to create the
file /etc/hal/fdi/preprobe/xboxdrv.fdi
containing:
input.keys]]>
This will tell HAL and later Xorg that xboxdrv acts as keyboard.
For joystick buttons there is in addition to the BTN_JOYSTICK, BTN_X,
etc. macros the special name JS_$NUM, which sets the given button to
the $NUMS joystick button, i.e.:
% xboxdrv --ui-clear --ui-buttonmap A=JS_0,B=JS_1
Note that this will only work if no other joystick button ids are in
the way.
In addition to just the event you can also pass additional
configuration parameter seperated by colons, the exact
parameter differ on the type of event, everything but the
first parameter is optional:
--ui-axismap X1=REL_???:VALUE:REPEAT
VALUE:the maximum value of the event (default: 10)REPEAT:number of milisecond to pass before the event is fired again (default: 5)