A graphical joystick tester
Even when your joystick is working mostly fine, you might want to give it a try, as the calibration lets you get rid of overlarge default deadzones that many joysticks use and then is a noticable problem in some games.
Once compiled you can start jstest-gtk with:
or if you know the device you want to test with:
$ ./jstest-gtk /dev/input/js0
The main window will provide you with a list of currently available joysticks. When you double click a joystick it will display the Test dialog, allowing you to test buttons and axes on the joystick.
The mapping dialog allows you to reorder the buttons and axis. This is useful for example when a game expects the dpad to be on axis 0 and 1, while in reality it is often on axis 4 and 5 on a dual-analogstick gamepad.
The calibration dialog allows you to manipulate some low level details on how the raw axis values are mapped to the joystick device. For example you can inverse an axis, disable an axis or remove its deadzone, to gain more fine control on small movements. This is especially useful as the default calibration values for most joysticks give it a far bigger deadzone then needed, thus reducing your ability for fine movements.