jstest is a Linux command-line utility for viewing joystick devices and their live input events. It reports detected axes, buttons, current values, and button states, making controller behavior observable before connecting it to robot software. section 7.5.1
Use the output to identify controller inputs:
- Map numbered buttons to physical controls by pressing each button and observing its on/off state. section 7.5.1
- Read axes as numeric values, with a centered stick reported as 0 and movement changing the value. section 7.5.1
- Use the discovered numbers later to map controller inputs to application behavior. section 7.5.1
Inspect a wireless controller
Install the joystick utility, then run jstest against /dev/input/js0. The live display identifies eight axes and thirteen buttons; pressing the cross button changes button 0 to on, while pressing the circle button changes button 1 to on.
