1jscal(1) General Commands Manual jscal(1)
2
3
4
6 jscal - joystick calibration and remapping program
7
9 jscal [options] <device‐name>
10
12 jscal calibrates joysticks and maps joystick axes and buttons. Cali‐
13 brating a joystick ensures the positions on the various axes are cor‐
14 rectly interpreted. Mapping axes and buttons allows the meanings of
15 the joystick's axes and buttons to be redefined.
16
17 On Debian systems the calibration settings can be stored and later ap‐
18 plied automatically using the jscal-store command.
19
21 -c, --calibrate
22 Calibrate the joystick.
23
24 -h, --help
25 Print out a summary of available options.
26
27 -b <fIbutton>
28 Specify a button to use to continue. By default, when calibrat‐
29 ing axes, any button will cause the position to be read and used
30 for calibration; this option allows a specific button to be cho‐
31 sen instead. This is useful with devices where a single input is
32 used for both an axis and a button.
33
34 -s, --set-correction <nb_axes,type,precision,coefficients,...>
35 Sets correction to specified values. For each axis, specify the
36 correction type (0 for none, 1 for "broken line"), the preci‐
37 sion, and if necessary the correction coefficients ("broken
38 line" corrections take four coefficients).
39
40 -u, --set-mappings <nb_axes,axmap1,axmap2,...,nb_buttons,btnmap1,btn‐
41 map2,...>
42 Sets axis and button mappings. n_of_buttons can be set to 0 to
43 remap axes only.
44
45 -t, --test-center
46 Tests if the joystick is correctly calibrated. Returns 2 if the
47 axes are not calibrated, 3 if buttons were pressed, 1 if there
48 was any other error, and 0 on success.
49
50 -V, --version
51 Prints the version numbers of the running joystick driver and
52 that which jscal was compiled for.
53
54 -p, --print-correction
55 Prints the current correction settings. The format of the out‐
56 put is a jscal command line.
57
58 -q, --print-mappings
59 Prints the current axis and button mappings. The format of the
60 output is a jscal command line.
61
63 Using the Linux input system, joysticks are expected to produce values
64 between -32767 and 32767 for axes, with 0 meaning the joystick is cen‐
65 tred. Thus, full‐left should produce -32767 on the X axis, full‐right
66 32767 on the X axis, full‐forward -32767 on the Y axis, and so on.
67
68 Many joysticks and gamepads (especially older ones) are slightly mis‐
69 aligned; as a result they may not use the full range of values (for the
70 extremes of the axes), or more annoyingly they may not give 0 when cen‐
71 tred. Calibrating a joystick provides the kernel with information on a
72 joystick's real behaviour, which allows the kernel to correct various
73 joysticks' deficiencies and produce consistent output as far as joy‐
74 stick‐using software is concerned.
75
76 jstest(1) is useful to determine whether a joystick is calibrated: when
77 run, it should produce all 0s when the joystick is at rest, and each
78 axis should be able to produce the values -32767 and 32767. Analog
79 joysticks should produce values in between 0 and the extremes, but this
80 is not necessary; digital directional pads work fine with only the
81 three values.
82
84 ffset(1), jstest(1), jscal-store(1).
85
87 jscal was written by Vojtech Pavlik and improved by many others; see
88 the linuxconsole tools documentation for details.
89
90 This manual page was written by Stephen Kitt <steve@sk2.org>, for the
91 Debian GNU/Linux system (but may be used by others).
92
93
94
95jscal May 21, 2022 jscal(1)