FreeVR: Virtual Reality Integration Library
FreeVR
Tutorials
User Guide
Programming
Functions

FreeVR

TUTORIALS

DOWNLOADS

GUIDES
    Administrator
    User
    Programming
    Function List
    Library Dev
    Socket Interface

MAN PAGES


All materials
Copyright © 2013
William R. Sherman

Manpage of JOYTEST

JOYTEST

Section: FreeVR Commands (1FV)
Updated: 9 October 2013
Index Return to Main Contents

 

NAME

joytest - test the setup of a joystick device connected via the Linux joydev input system.  

SYNOPSIS

joytest [-list] [-nodata] [<event device>]  

DESCRIPTION

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.  

OPTIONS

-list
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.
-nodata
The -nodata option reports detailed information about the device and then exits. 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.
 

ARGUMENTS

[<joydev device>]
The <joydev device> argument is a filesystem path pointing to a specific Linux input event device - for example "/dev/input/js0".
 

ENVIRONMENT VARIABLES

JOYDEV_DEVICE
Set the path of the default joystick device to read when no device argument is provided.
 

NOTES

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 same manufacturer.

This table lists the mappings of a handful of common game controllers (in some cases common during the era in which they were sold).

numLogitechLogitechLogitechMicrosoft
ButtonsWingmanRumblePad2F710XBoxGrIP


0    A1x/bluea/greengreen
1    B2a/greenb/redyellow
2    C3b/redx/bluered
3    X4y/yellowy/yellowblue

4    Y5/L1left-btnleft-btnL1
5    Z6/R1right-btnright-btnR1
6    L17/L2left-trig*startL2
7    R18/R2right-trig*LogoR2

8    Start9/backbackleft-joyStart
9    L210/startstartright-joySelect

 10    
R2left-joyleft-joyback

 11    
Moderight-joyright-joy

Valuators    

0    left-xleft-xleft-xleft-x
1    left-yleft-yleft-yleft-y
2    sliderright-xright-xleft-trig
3    right-xright-yright-yright-x

4    right-ydig-xdig-xright-y
5    dig-xdig-ydig-yright-trigjoy-x
6    dig-ydig-xjoy-y
7    dig-y

(*) -- 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.

 

EXAMPLES

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
% joytest
 

BUGS

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.  

TODO

*
Report the joystick calibration information
*
It would be nice to manipulate device force feedback events
*
Implement a screen-rendering option
 

SEE ALSO

eviotest(1FV), vrpntest(1FV), vruiddtest(1FV), dtracktest(1FV), fobtest(1FV), freevr(7FV), jstest(1)  

LOCATION

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

Copyright 2013, Bill Sherman, All rights reserved.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ARGUMENTS
ENVIRONMENT VARIABLES
NOTES
EXAMPLES
BUGS
TODO
SEE ALSO
LOCATION
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 05:02:19 GMT, December 13, 2013