Manpage of JOYTEST
Section: FreeVR Commands (1FV)
Updated: 9 October 2013
Return to Main Contents
- test the setup of a joystick device connected via the Linux
joydev input system.
joytest [-list] [-nodata] [<event device>]
The joytest program is used to interface with devices connected via
the Linux joydev input system.
The joytest program can be used to list joystick devices and provide
their self-reported names, or to provide a live report of the inputs.
Before rendering the input stream, joytest will output information
specific to the input device such as the number of all button
inputs, and axis (aka valuator) inputs.
The program is terminated by pressing the interrupt key (usually ^C).
Note that sometimes this doesn't fully work the first time, but it will
work the second time.
The -list option lists all Linux joystick devices of the form
"/dev/input/js<N>", where N is from [0:512].
It will only list devices that exist.
For devices that exist, but for which the current user does not have
permission to access, then this information will be reported.
All other arguments are ignored when "-list" is specified.
The -nodata option reports detailed information about the device and
The reported data includes the name of the device, the manufacturer id,
and item code as well as the name and number of all inputs.
- [<joydev device>]
The <joydev device> argument is a filesystem path pointing to a specific
Linux input event device - for example "/dev/input/js0".
Set the path of the default joystick device to read when no device argument
The Linux Joystick driver reports the activity of buttons and valuators
in their numeric ordering.
How buttons on the controller are mapped to inputs can and does vary
widely among different controllers -- even among controllers from the
This table lists the mappings of a handful of common game controllers
(in some cases common during the era in which they were sold).
(*) -- For the Logitech F710 operating as a generic controller, the left
right triggers have to hit a threshold to activate, and the Logitech Logo
button produces no output.
As you can see, there is very little consistency apart from all the modern
controllers using the first two valuator fields for the left-side joystick.
- List all Linux input event devices:
% joytest -list
- Report inputs from the device at "/dev/input/js1":
% joytest /dev/input/js1
- Set the default input device to be "/dev/input/js1" and then report those events:
% setenv JOYDEV_DEVICE /dev/input/js1
The fact that joytest does not always terminate when receiving the
first interrupt signal (ie. ^C) may be considered a bug. The workaround
is already coded in the program - just send a second interrupt.
Report the joystick calibration information
It would be nice to manipulate device force feedback events
Implement a screen-rendering option
The source code for joytest is in the "vr_input.joydev.c" file,
which also handles the joydev input interface to the FreeVR library.
Copyright 2013, Bill Sherman, All rights reserved.
- ENVIRONMENT VARIABLES
- SEE ALSO
This document was created by
using the manual pages.
Time: 05:02:19 GMT, December 13, 2013