This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xboxdrv.html
2619 lines (1859 loc) · 130 KB
/
xboxdrv.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>xboxdrv</title>
<link rel="stylesheet" type="text/css" href="default.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="home" href="index.html" title="xboxdrv" />
</head>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center"><span class="application">xboxdrv</span></th>
</tr>
</table>
<hr />
</div>
<div class="refentry">
<a id="xboxdrv" name="xboxdrv"></a>
<div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p><span class="application">xboxdrv</span> — A Xbox/Xbox360 gamepad driver that works in userspace</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis">
<p><code class="command">xboxdrv</code> [OPTION...] [--] [COMMAND] [ARGUMENTS]</p>
</div>
</div>
<div class="refsect1">
<a id="idp60605440" name="idp60605440"></a>
<h2>Description</h2>
<p><span class="command"><strong>xboxdrv</strong></span> is a driver for Xbox and Xbox360 gamepads. It works by reading the raw data from the controller with the userspace library libusb and then passes the interpreted data to the kernel via uinput. This allows <span class="command"><strong>xboxdrv</strong></span> to provide regular joystick and event devices, which makes it compatible with all Linux software.</p>
<p>Aside from the pure driver, <span class="command"><strong>xboxdrv</strong></span> also includes a rich set of configuration options that allow you to tweak the abilities of the virtual input devices that xboxdrv will create. This includes basic button and axis remapping, as well as more complicated things like mouse and keyboard emulation, auto-fire and throttle control emulation.</p>
<p>It is also possible for <span class="command"><strong>xboxdrv</strong></span> to read input data directly from an event device, this allows the use of the configurability of <span class="command"><strong>xboxdrv</strong></span> on regular PC joysticks, keyboards and mice and thus lets <span class="command"><strong>xboxdrv</strong></span> serve a similar purpose as <span class="command"><strong>joy2key</strong></span>. See the option <code class="option">--evdev</code> below for more information.</p>
<p>When a <code class="option">COMMAND</code> is provided xboxdrv will launch that application and be running till that application exits. This is a convenience function to make it easier to use xboxdrv in wrapper scripts. See the section <a class="link" href="index.html#wrapperscripts" title="Writing Start-Up Scripts for Games">Writing Start-Up Scripts for Games</a> for more information.</p>
</div>
<div class="refsect1">
<a id="idp65313344" name="idp65313344"></a>
<h2>Options</h2>
<div class="refsect2">
<a id="idp65313984" name="idp65313984"></a>
<h3>General Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">-h</code>, <code class="option">--help</code></span></dt>
<dd>
<p>Display help text and exit.</p>
</dd>
<dt><span class="term">-V, --version</span></dt>
<dd>
<p>Print the version number and exit.</p>
</dd>
<dt><span class="term"><code class="option">-v</code>, <code class="option">--verbose</code></span></dt>
<dd>
<p>Print verbose messages.</p>
</dd>
<dt><span class="term"><code class="option">--debug</code></span></dt>
<dd>
<p>Print even more verbose messages then <code class="option">--verbose</code>.</p>
</dd>
<dt><span class="term"><code class="option">-s</code>, <code class="option">--silent</code></span></dt>
<dd>
<p>Do not display controller events on the terminal. For regular use this option should always be used as output data to the terminal can eat up quite a bit of CPU.</p>
</dd>
<dt><span class="term"><code class="option">--quiet</code></span></dt>
<dd>
<p>Do not display startup text and suppress most other output.</p>
</dd>
<dt><span class="term"><code class="option">--priority</code> <em class="replaceable"><code>PRIORITY</code></em></span></dt>
<dd>
<p>Possible values for <em class="replaceable"><code>PRIORITY</code></em> are "normal" and "realtime". Realtime scheduling gives the xboxdrv process higher priority and thus allows it to function properly even when the machine is under load.</p>
<p>Note that realtime priority requires running xboxdrv as root, when running xboxdrv as user there is no way to increase the priority.</p>
<p>This option is deprecated, use <span class="citerefentry"><span class="refentrytitle">chrt</span>(1)</span> instead to achive the same effect.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65331200" name="idp65331200"></a>
<h3>List Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--help-led</code></span></dt>
<dd>
<p>List possible values for the led.</p>
</dd>
<dt><span class="term"><code class="option">--help-devices</code></span></dt>
<dd>
<p>List supported devices.</p>
</dd>
<dt><span class="term"><code class="option">--list-supported-devices</code></span></dt>
<dd>
<p>List supported devices (used by xboxdrv-daemon.py).</p>
</dd>
<dt><span class="term"><code class="option">--list-supported-devices-xpad</code></span></dt>
<dd>
<p>List supported devices in <code class="filename">xpad.c</code> style.</p>
</dd>
<dt><span class="term"><code class="option">--help-abs</code></span></dt>
<dd>
<p>List all allowed EV_ABS symbols.</p>
</dd>
<dt><span class="term"><code class="option">--help-rel</code></span></dt>
<dd>
<p>List all allowed EV_REL symbols.</p>
</dd>
<dt><span class="term"><code class="option">--help-key</code></span></dt>
<dd>
<p>List all allowed EV_KEY symbols.</p>
</dd>
<dt><span class="term"><code class="option">--help-x11keysym</code></span></dt>
<dd>
<p>List all allowed X11 Keysym symbols.</p>
</dd>
<dt><span class="term"><code class="option">--help-all</code></span></dt>
<dd>
<p>List all symbols that can be used in <code class="option">--ui-buttonmap</code>, <code class="option">--ui-axismap</code>, <code class="option">--buttonmap</code> and <code class="option">--axismap</code>. This option is the same as <code class="option">--help-abs</code>, <code class="option">--help-rel</code>, <code class="option">--help-key</code> and <code class="option">--help-x11keysym</code>.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65351024" name="idp65351024"></a>
<h3>Config File Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">-c</code>, <code class="option">--config</code> <em class="replaceable"><code>FILE</code></em></span></dt>
<dd>
<p>Reads configuration information from <em class="replaceable"><code>FILE</code></em>. Configurations from file are handling as if they would be command line options at the position of <code class="option">--config</code> <em class="replaceable"><code>FILE</code></em>.</p>
<p>The syntax of <em class="replaceable"><code>FILE</code></em> is the familiar INI syntax used for many configuration files. Regular key/value pairs must go into the [xboxdrv] section. '#' and ';' can be used for comments. Key names have for most part the same name as command line options. Command line options that take a list of input mappings (--ui-buttonmap, --ui-axismap, --evdev-absmap, ...) can be split of into their own section for better readability.</p>
<p>The <code class="filename">examples/</code> directory contains some example configuration files.</p>
<pre class="programlisting">
[xboxdrv]
silent=true
deadzone=6000
dpad-as-button=true
trigger-as-button=true
[ui-axismap]
x2=REL_X:10
y2=REL_Y:-10
x1=KEY_A:KEY_D
y1=KEY_W:KEY_S
[ui-buttonmap]
a=KEY_LEFTSHIFT
b=BTN_C
x=BTN_EXTRA
y=KEY_C
[ui-buttonmap]
lb=BTN_RIGHT
rb=KEY_SPACE
[ui-buttonmap]
lt=KEY_Z
rt=BTN_LEFT
[ui-buttonmap]
dl=KEY_4
dr=KEY_2
du=REL_WHEEL:-1:150
dd=REL_WHEEL:1:150
[ui-buttonmap]
back=KEY_TAB
start=KEY_ESC
# EOF #
</pre>
</dd>
<dt><span class="term"><code class="option">--alt-config</code> <em class="replaceable"><code>FILE</code></em></span></dt>
<dd>
<p>A shortcut for writing <code class="option">--next-config</code> <code class="option">--config</code> <em class="replaceable"><code>FILE</code></em>.</p>
<p>To load multiple configuration options use:</p>
<pre class="programlisting">
xboxdrv --config first.ini --alt-config second.ini --alt-config third.ini
</pre>
</dd>
<dt><span class="term"><code class="option">-o</code>, <code class="option">--option</code> <em class="replaceable"><code>NAME=VALUE</code></em></span></dt>
<dd>
<p>Set an option as if it would come from a config file from the command line.</p>
</dd>
<dt><span class="term"><code class="option">--write-config</code> <em class="replaceable"><code>FILE</code></em></span></dt>
<dd>
<p>Write an example configuration file to <em class="replaceable"><code>FILE</code></em>.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65370688" name="idp65370688"></a>
<h3>Daemon Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">-D</code>, <code class="option">--daemon</code></span></dt>
<dd>
<p>Run xboxdrv as daemon. If this option is given xboxdrv will listen to udev for USB connection events and launch driver threads for newly connected controllers.</p>
<p>Configuration options can still be supplied as usual. Note however that xboxdrv when run as daemon will not create new uinput devices on demand, instead it will only create devices once at startup for the given configurations and then assign new controllers to these configurations. While this means xboxdrv can't support an unlimited number of controllers, it also means that xboxdrv can allow hot plugging even for applications that don't support it themselves, as applications will only see the permanent device files, not the controller that xboxdrv will change around under the hood.</p>
<p>An example configuration that supports three controller would look like this:</p>
<pre class="programlisting">
xboxdrv --daemon \
# config options for the first controller
--next-controller \
# config options for the second controller
--next-controller
# config options for the third controller
</pre>
<p>The <code class="option">--match</code> option can be used to limit the controller slots to only those controllers that match the given RULE and thus be used to assign configurations only to specific controllers.</p>
</dd>
<dt><span class="term"><code class="option">--detach</code></span></dt>
<dd>
<p>Detaches xboxdrv from the current shell, only valid if <code class="option">--daemon</code> is given.</p>
</dd>
<dt><span class="term"><code class="option">--pid-file</code> <em class="replaceable"><code>FILE</code></em></span></dt>
<dd>
<p>Write the xboxdrv daemon process id to FILE.</p>
</dd>
<dt><span class="term"><code class="option">--dbus</code> <em class="replaceable"><code>BUS</code></em></span></dt>
<dd>
<p>Set which bus type xboxdrv should connect to. Allowed values for BUS are <code class="constant">session</code>, <code class="constant">system</code>, <code class="constant">disabled</code> and <code class="constant">auto</code>. The default is <code class="constant">auto</code>, which will detect the appropriate bus type depending on if xboxdrv is run as root (<code class="constant">system</code> or as user (<code class="constant">session</code>). Running with <code class="constant">disabled</code> will disable D-Bus support completely.</p>
</dd>
<dt><span class="term"><code class="option">--on-connect</code> <em class="replaceable"><code>EXE</code></em></span></dt>
<dd>
<p>Launches <em class="replaceable"><code>EXE</code></em> when a controller gets connected. As arguments "<em class="replaceable"><code>BUSDEV</code></em>:<em class="replaceable"><code>DEVNUM</code></em>", "<em class="replaceable"><code>idVendor</code></em>:<em class="replaceable"><code>idProduct</code></em>", "<em class="replaceable"><code>NAME</code></em> are provided.</p>
</dd>
<dt><span class="term"><code class="option">--on-disconnect</code> <em class="replaceable"><code>EXE</code></em></span></dt>
<dd>
<p>Launches <em class="replaceable"><code>EXE</code></em> when a controller gets disconnected. As arguments "<em class="replaceable"><code>BUSDEV</code></em>:<em class="replaceable"><code>DEVNUM</code></em>", "<em class="replaceable"><code>idVendor</code></em>:<em class="replaceable"><code>idProduct</code></em>", "<em class="replaceable"><code>NAME</code></em> are provided.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65397712" name="idp65397712"></a>
<h3>Device Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">-L</code>, <code class="option">--list-controller</code></span></dt>
<dd>
<p>List available controllers on the system.</p>
</dd>
<dt><span class="term"><code class="option">-i</code>, <code class="option">--id</code> <em class="replaceable"><code>N</code></em></span></dt>
<dd>
<p>Use controller with id N (default: 0), use <code class="option">--list-controller</code> to obtain a list of available controller.</p>
</dd>
<dt><span class="term"><code class="option">-w</code>, <code class="option">--wid</code> <em class="replaceable"><code>N</code></em></span></dt>
<dd>
<p>Use wireless controller with wid N (default: 0).</p>
</dd>
<dt><span class="term"><code class="option">--device-by-path</code> <em class="replaceable"><code>BUS:DEV</code></em></span></dt>
<dd>
<p>Use the controller at BUS:DEV, do not do any automatic scanning. Useful for cases when a controller isn't known by xboxdrv, but supports one of the given protocols.</p>
</dd>
<dt><span class="term"><code class="option">--device-by-id</code> <em class="replaceable"><code>VENDOR:PRODUCT</code></em></span></dt>
<dd>
<p>Use device that matches VENDOR:PRODUCT (as returned by <span class="command"><strong>lsusb</strong></span>). Useful for cases when a controller isn't known by xboxdrv, but supports one of the given protocols.</p>
</dd>
<dt><span class="term"><code class="option">--type</code> <em class="replaceable"><code>TYPE</code></em></span></dt>
<dd>
<p>Ignore autodetection and enforce the controller type. Possible values for <em class="replaceable"><code>TYPE</code></em>:</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc;">
<li class="listitem">
<p>xbox</p>
</li>
<li class="listitem">
<p>xbox-mat</p>
</li>
<li class="listitem">
<p>xbox360</p>
</li>
<li class="listitem">
<p>xbox360-wireless</p>
</li>
<li class="listitem">
<p>xbox360-guitar</p>
</li>
<li class="listitem">
<p>firestorm</p>
</li>
<li class="listitem">
<p>firestorm-vsb</p>
</li>
<li class="listitem">
<p>saitek-p2500</p>
</li>
<li class="listitem">
<p>generic-usb</p>
</li>
</ul>
</div>
<p>The <code class="option">generic-usb</code> type is a special type that will work with any USB controller, it will however not interpret the input it gets, but just dump it to the console for development purposes. See <code class="option">--generic-usb-spec</code> for further information.</p>
</dd>
<dt><span class="term"><code class="option">-d</code>, <code class="option">--detach-kernel-driver</code></span></dt>
<dd>
<p>Detaches the kernel driver that is currently associated with the given device. This is useful when you have the xpad module loaded and want to use xboxdrv without unloading it.</p>
</dd>
<dt><span class="term"><code class="option">--generic-usb-spec</code> <em class="replaceable"><code>NAME=VALUE,...</code></em></span></dt>
<dd>
<p>Allows to specify from which endpoint <code class="option">generic-usb</code> will read. The spec as the form of <em class="replaceable"><code>NAME=VALUE,...</code></em>. Allowed values are:</p>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term">vid=HEX</span></dt>
<dd>
<p>The vendor id of the controller to which this spec applies</p>
</dd>
<dt><span class="term">pid=HEX</span></dt>
<dd>
<p>The product id of the controller to which this spec applies</p>
</dd>
<dt><span class="term">if=NUM</span></dt>
<dd>
<p>The interface from which GenericUSBController should be read</p>
</dd>
<dt><span class="term">ep=NUM</span></dt>
<dd>
<p>The endpoint from which GenericUSBController should be read</p>
</dd>
</dl>
</div>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65433312" name="idp65433312"></a>
<h3>Evdev Option</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--evdev</code> <em class="replaceable"><code>DEVICE</code></em></span></dt>
<dd>
<p>Allows you to read input data from a regular event device. This allows you to use <span class="command"><strong>xboxdrv</strong></span> on regular PC joysticks. The data that is read from the event device is converted internally into a XboxMsg object and then passed through the same configuration pipeline as it would be for a regular Xbox360 controller. This allows you to make use of all the regular configurability, but limits you to the number of axis and buttons that an Xbox360 controller provides.</p>
<p>As a regular PC joystick will most likely already create a <code class="filename">/dev/input/jsX</code> device by itself, you might need to get rid of that so that a game will properly detect the joystick device created by <span class="command"><strong>xboxdrv</strong></span>. The easiest way to accomplish that is to simply delete the old joystick and rename the device that <span class="command"><strong>xboxdrv</strong></span> created to <code class="filename">/dev/input/js0</code>. When you use udev, this operation should be harmless and automatically reverse itself when you remove the controller and plug it back in or when you reboot the computer.</p>
</dd>
<dt><span class="term"><code class="option">--evdev-debug</code></span></dt>
<dd>
<p>The evdev event handler will print all received events to stdout, this makes it easy to see which events a given controller sends.</p>
</dd>
<dt><span class="term"><code class="option">--evdev-no-grab</code></span></dt>
<dd>
<p>By default the evdev driver will grab the device, thus making it impossible for other applications to receive events from that device. This is done to avoid confusing applications, as otherwise an app would receive every event twice, once from the original device and once from the virtual xboxdrv one. In some cases this behaviour is undesired, such when mapping only an otherwise unhandled subset of keys of an device, i.e. mapping the multimedia keys on a keyboard, so this option turns the grab off.</p>
</dd>
<dt><span class="term"><code class="option">--evdev-absmap</code> <em class="replaceable"><code>ABSMAP,...</code></em></span></dt>
<dd>
<pre class="programlisting">
ABSMAP = EVDEV_ABS [ "+", "-" ] "=" XBOXAXIS ;
</pre>
<p>Sets how evdev events are mapped to Xbox axis events. An example configuration would look like this:</p>
<pre class="programlisting">
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_THROTTLE=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y
</pre>
<p><span class="command"><strong>xboxdrv</strong></span> will output on startup a full list of event names that the given event device supports and that can be used in place of <em class="replaceable"><code>EVDEV_ABS</code></em>.</p>
<p>It is also possible to map half-axis with a command like:</p>
<pre class="programlisting">
--evdev-absmap ABS_Y+=LT,ABS_Y-=RT
</pre>
<p>This will map the upward movement of the Y axis to the left trigger and the downward movement to the right trigger.</p>
</dd>
<dt><span class="term"><code class="option">--evdev-keymap</code> <em class="replaceable"><code>KEYMAP</code></em></span></dt>
<dd>
<p>Sets how evdev events are mapped to Xbox controller events. An example configuration would look like this:</p>
<pre class="programlisting">
--evdev-keymap BTN_TRIGGER=a,BTN_THUMB=b,BTN_THUMB2=x
</pre>
<p><span class="command"><strong>xboxdrv</strong></span> will output on start a full list of event names that the given event device supports.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65466032" name="idp65466032"></a>
<h3>Status Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">-l</code>, <code class="option">--led</code> <em class="replaceable"><code>NUM</code></em></span></dt>
<dd>
<p>Set LED status. Possible values for <em class="replaceable"><code>NUM</code></em> are:</p>
<div class="table">
<a id="idp65469968" name="idp65469968"></a>
<p class="title"><strong>Table 1. LED Status Codes</strong></p>
<div class="table-contents">
<table summary="LED Status Codes" border="1">
<colgroup>
<col align="right" />
<col align="left" />
</colgroup>
<thead>
<tr>
<th align="right">Num</th>
<th align="left">Behavior</th>
</tr>
</thead>
<tbody>
<tr>
<td align="right">0</td>
<td align="left">off</td>
</tr>
<tr>
<td align="right">1</td>
<td align="left">all blinking</td>
</tr>
<tr>
<td align="right">2</td>
<td align="left">1/top-left blink, then on</td>
</tr>
<tr>
<td align="right">3</td>
<td align="left">2/top-right blink, then on</td>
</tr>
<tr>
<td align="right">4</td>
<td align="left">3/bottom-left blink, then on</td>
</tr>
<tr>
<td align="right">5</td>
<td align="left">4/bottom-right blink, then on</td>
</tr>
<tr>
<td align="right">6</td>
<td align="left">1/top-left on</td>
</tr>
<tr>
<td align="right">7</td>
<td align="left">2/top-right on</td>
</tr>
<tr>
<td align="right">8</td>
<td align="left">3/bottom-left on</td>
</tr>
<tr>
<td align="right">9</td>
<td align="left">4/bottom-right on</td>
</tr>
<tr>
<td align="right">10</td>
<td align="left">rotate</td>
</tr>
<tr>
<td align="right">11</td>
<td align="left">blink</td>
</tr>
<tr>
<td align="right">12</td>
<td align="left">blink slower</td>
</tr>
<tr>
<td align="right">13</td>
<td align="left">rotate with two lights</td>
</tr>
<tr>
<td align="right">14</td>
<td align="left">blink</td>
</tr>
<tr>
<td align="right">15</td>
<td align="left">blink once</td>
</tr>
</tbody>
</table>
</div>
</div><br class="table-break" />
</dd>
<dt><span class="term"><code class="option">--rumble-gain</code> <em class="replaceable"><code>AMOUNT</code></em></span></dt>
<dd>
<p>You can change the rumble strength via:</p>
<pre class="programlisting">
$ xboxdrv --rumble-gain 50%
</pre>
<p>Values larger then 100% are possible as well and will amplify small rumble commands, rumble commands already at the maximum will stay unchanged.</p>
</dd>
<dt><span class="term"><code class="option">-q</code>, <code class="option">--quit</code></span></dt>
<dd>
<p>Exit xboxdrv after setting LED or rumble values.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65495520" name="idp65495520"></a>
<h3>Chatpad Options (experimental)</h3>
<p>Chatpad support is still experimental. Basic keyboard usage will work, there is however currently no support for customization or the green and orange key modifiers.</p>
<p>Starting xboxdrv multiple times in a row with the <code class="option">--chatpad</code> option can crash the controller. Unplugging it and plugging it back in should reset it.</p>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--chatpad</code></span></dt>
<dd>
<p>Enables the support for the Xbox360 Chatpad. WARNING: This is preliminary code, it will crash your gamepad when xboxdrv is started multiple times and won't provide proper keymapping for any of the umlauts and special characters.</p>
</dd>
<dt><span class="term"><code class="option">--chatpad-no-init</code></span></dt>
<dd>
<p>This will start chatpad support with out sending the init sequence, thus potentially avoiding crashing the controller if xboxdrv is started multiple times.</p>
</dd>
<dt><span class="term"><code class="option">--chatpad-debug</code></span></dt>
<dd>
<p>Output raw chatpad data to the stdout for debugging purpose.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65503824" name="idp65503824"></a>
<h3>Headset Options (experimental, Xbox360 USB only)</h3>
<p>Xboxdrv does not support the headset, the options below are for developers only and will dump raw headset data, not .wav files.</p>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--headset</code></span></dt>
<dd>
<p>Enable headset support and dump incoming data to stdout.</p>
</dd>
<dt><span class="term"><code class="option">--headset-dump</code> <em class="replaceable"><code>FILE</code></em></span></dt>
<dd>
<p>Enable headset support and dump incoming data to FILE.</p>
</dd>
<dt><span class="term"><code class="option">--headset-play</code> <em class="replaceable"><code>FILE</code></em></span></dt>
<dd>
<p>Enable headset support and send FILE to the headset for playback.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65511984" name="idp65511984"></a>
<h3>Force Feedback</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--force-feedback</code></span></dt>
<dd>
<p>Enables the standard kernel force feedback interface. It is disabled by default as it causes trouble with some applications running in Wine.</p>
<p>Since the Xbox360 controller supports just rumble not full force feedback, xboxdrv tries to emulate other effects. This emulation hasn't been tested much and might not always work as expected. Bug reports and test cases are welcome.</p>
<p>Note that you must close the application that is using force feedback always before you close the xboxdrv driver, else you might end up with a hanging non-interruptable xboxdrv process that will require a reboot to get rid of.</p>
<p>When using xboxdrv in daemon mode with multiple controller slots you have to enable force feedback for each slot separately.</p>
</dd>
<dt><span class="term"><code class="option">--ff-device</code> <em class="replaceable"><code>DEVICEID</code></em></span></dt>
<dd>
<p>Select to which virtual device the force-feedback callbacks will be connected to, it defaults to <code class="constant">joystick</code>. Other allowed values are <code class="constant">mouse</code>, <code class="constant">keyboard</code> and any integer number. See <code class="option">--ui-buttonmap</code> for further information on how device-ids work.</p>
</dd>
<dt><span class="term"><code class="option">-R</code>, <code class="option">--test-rumble</code></span></dt>
<dd>
<p>Pressing LT will move the left rumble motor and pressing RT will move the right one. Rumble motor strength depends on how hard you press. This is useful for testing the rumble motors.</p>
</dd>
<dt><span class="term"><code class="option">-r</code>, <code class="option">--rumble</code> <em class="replaceable"><code>L,R</code></em></span></dt>
<dd>
<p>Set the speed for both rumble motors. Values from 0 to 255 are accepted, the default is 0,0.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65525968" name="idp65525968"></a>
<h3>Controller Slot Options</h3>
<p>Controller slots are used when running xboxdrv in daemon mode. Each slot represents a complete controller configuration. If you want to use multiple controller in daemon mode you have to supply multiple controller slots.</p>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--controller-slot</code> <em class="replaceable"><code>N</code></em></span></dt>
<dd>
<p>Switches to the controller slot with the number N, numbering starts at zero.</p>
</dd>
<dt><span class="term"><code class="option">--next-controller</code></span></dt>
<dd>
<p>Switches to the next controller slot.</p>
</dd>
<dt><span class="term"><code class="option">--match</code> <em class="replaceable"><code>RULE,...</code></em></span></dt>
<dd>
<p>Limits a controller slot to devices that match any one of the given rules. Possible match rules are:</p>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term">usbid=<em class="replaceable"><code>VENDOR</code></em>:<em class="replaceable"><code>PRODUCT</code></em></span></dt>
<dd>
<p>Match controllers that have the given USB vendor and product ids.</p>
</dd>
<dt><span class="term">vendor=<em class="replaceable"><code>VENDOR</code></em></span></dt>
<dd>
<p>Match controllers that have the given USB idVendor.</p>
</dd>
<dt><span class="term">product=<em class="replaceable"><code>PRODUCT</code></em></span></dt>
<dd>
<p>Match controllers that have the given USB idProduct.</p>
</dd>
<dt><span class="term">property=<em class="replaceable"><code>PROPERTY</code></em>:<em class="replaceable"><code>VALUE</code></em></span></dt>
<dd>
<p>Match against an arbitrary udev property, with name <em class="replaceable"><code>PROPERTY</code></em> and value <em class="replaceable"><code>VALUE</code></em>.</p>
</dd>
<dt><span class="term">usbpath=<em class="replaceable"><code>BUS</code></em>:<em class="replaceable"><code>DEV</code></em></span></dt>
<dd>
<p>Match against the USB path given by <em class="replaceable"><code>BUS</code></em> and <em class="replaceable"><code>DEV</code></em>.</p>
</dd>
<dt><span class="term">usbserial=<em class="replaceable"><code>SERIAL</code></em></span></dt>
<dd>
<p>Match against the USB iSerial number.</p>
</dd>
</dl>
</div>
</dd>
<dt><span class="term"><code class="option">--match-group</code> <em class="replaceable"><code>RULE,...</code></em></span></dt>
<dd>
<p>Limits a controller slot to devices that match all of the given rules. Possible match rules are the same as for <code class="option">--match</code>.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65551760" name="idp65551760"></a>
<h3>Config Slot Options</h3>
<p>You can use multiple configurations, called config slots, with your controller. You switch between those multiple configurations by pressing the Guide button by default, but you can also set another button via the option <code class="option">--toggle</code>.</p>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--config-slot</code> <em class="replaceable"><code>NUM</code></em></span></dt>
<dd>
<p>Select the config slot <em class="replaceable"><code>NUM</code></em>.</p>
</dd>
<dt><span class="term"><code class="option">--next-config</code></span></dt>
<dd>
<p>Allows the creation of an alternative uinput configuration to which one can toggle at runtime by pressing the ui-toggle button (defaults to guide).</p>
<pre class="programlisting">
$ xboxdrv \
--mouse \
--next-config
--ui-axismap X1=ABS_X,Y1=ABS_Y \
--ui-buttonmap A=JS_0,B=JS_1
</pre>
<p>The above configuration would install mouse emulation as first configuration and a simple joystick emulation as second configuration. Allowing toggling between mouse emulation and joystick handling by pressing the guide button.</p>
<p>Not that <code class="option">--next-config</code> is currently limited to only configurations done with <code class="option">--ui-buttonmap</code> and <code class="option">--ui-axismap</code>, autofire, throttle emulation, deadzones and all other things can currently not be switched at runtime.</p>
</dd>
<dt><span class="term"><code class="option">--toggle</code> <em class="replaceable"><code>XBOXBTN</code></em></span></dt>
<dd>
<p>Sets the button that will be used to toggle between different different configurations. A value of 'void' will disable the toggle button. If no toggle button is specified, the guide button will be used to toggle between configurations.</p>
</dd>
</dl>
</div>
</div>
<div class="refsect2">
<a id="idp65564704" name="idp65564704"></a>
<h3>Configuration Options</h3>
<div class="variablelist">
<dl class="variablelist">
<dt><span class="term"><code class="option">--modifier <em class="replaceable"><code>MOD</code></em></code></span></dt>
<dd>
<p>Add a modifier to the modifier stack, see <a class="link" href="index.html#modifier" title="Modifier">Modifier</a> for a full list of possible modifier.</p>
</dd>
<dt><span class="term"><code class="option">--timeout <em class="replaceable"><code>MSEC</code></em></code></span></dt>
<dd>
<p>Specify the number of miliseconds that xboxdrv will wait for events from the controller before moving on and processing things like auto-fire or relative-axis. Default value is 10, smaller values will give you a higher resolution auto fire and relative event movement, but will waste some more CPU.</p>
</dd>
<dt><span class="term"><code class="option">-b, --buttonmap</code> <em class="replaceable"><code>BUTTON[^FILTER]...=BUTTON,...</code></em></span></dt>
<dd>
<p>Button remapping is available via the <code class="option">--buttonmap</code> option. If you want to swap button A and B start with:</p>
<pre class="programlisting">
$ xboxdrv --buttonmap A=B,B=A
</pre>
<p>If you want all face buttons send out A button events:</p>
<pre class="programlisting">
$ xboxdrv --buttonmap B=A,X=A,Y=A
</pre>
<p>Possible button names are (aliases are in parenthesis):</p>
<div class="table">
<a id="idp65575440" name="idp65575440"></a>
<p class="title"><strong>Table 2. Button Names</strong></p>
<div class="table-contents">
<table summary="Button Names" border="1">
<colgroup>
<col />
<col />
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>start, back</td>
<td>start, back buttons</td>
</tr>
<tr>
<td>guide</td>
<td>big X-button in the middle (Xbox360 only)</td>
</tr>
<tr>
<td>a(1), b(2), x(3), y(4)</td>
<td>face buttons</td>
</tr>
<tr>
<td>black, white</td>
<td>black, white buttons (Xbox1 only, mapped to lb, rb on Xbox360)</td>
</tr>
<tr>
<td>lb(5), rb(6)</td>
<td>shoulder buttons (Xbox360 only, mapped to black, white on Xbox1)</td>
</tr>
<tr>
<td>lt(7), rt(8)</td>
<td>analog trigger (needs --trigger-as-button option)</td>
</tr>
<tr>
<td>tl, tr</td>
<td>pressing the left or right analog stick</td>
</tr>
<tr>
<td>du(up), dd(down), dl(left), dr(right)</td>
<td>dpad directions (needs --dpad-as-button option)</td>
</tr>
<tr>
<td>green, red, yellow, blue, orange</td>
<td>guitar buttons</td>
</tr>
</tbody>
</table>
</div>