LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

jstest

joystick testing tool that displays real-time axis and button states

TLDR

Test joystick
$ jstest [/dev/input/js0]
copy
Test in one-line mode showing immediate status
$ jstest --normal [/dev/input/js0]
copy
Test using event output mode
$ jstest --event [/dev/input/js0]
copy
Test in non-blocking event mode
$ jstest --nonblock [/dev/input/js0]
copy

SYNOPSIS

jstest [options] device

DESCRIPTION

jstest can be used to test all the features of the Linux joystick API, including non-blocking and select(2) access, as well as version 0.x compatibility mode. It reads input from Linux joystick devices (/dev/input/js*) and shows axis and button values as they change.The tool is useful for verifying joystick functionality, calibration, and troubleshooting input issues. It works with gamepads, flight sticks, and other game controllers.

PARAMETERS

device

Joystick device path (e.g., /dev/input/js0).
--normal
One-line mode showing immediate axis and button status.
--old
Same as --normal but using the 0.x compatibility interface.
--event
Print events as they come in.
--nonblock
Same as --event but in non-blocking mode.
--select
Same as --event but using select(2) system call.

OUTPUT

$ Driver version is 2.1.0.
Joystick (Microsoft X-Box One pad) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 11 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0
Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off
copy

INSTALL

sudo apt install joystick
copy
sudo dnf install linuxconsoletools
copy
sudo apk add linuxconsoletools
copy
sudo zypper install linuxconsoletools
copy

CAVEATS

Requires joystick driver support. Device paths may change on hotplug. Calibration may be needed. Some controllers need xpad or other drivers.

HISTORY

jstest is part of the joystick package for Linux, providing basic input device testing. It works with the kernel's joystick API (/dev/input/js*).

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid