Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

joy2key(1) [debian man page]

JOY2KEY(1)						      General Commands Manual							JOY2KEY(1)

joy2key - Emulate keyboard events using a Joystick SYNOPSIS
joy2key Usage: joy2key ["Window Name"] [ -rawconsole ] [ -terminal ] [ -X ] [ -axis [(axis0) low hi] [(axis1) low hi] ...] [ -thresh [(axis0) low hi] [(axis1) low hi] ...] [ -buttons [(button0)] [(button1)] [(button2)] ...] [ -dev {/dev/input/js0} ] [ -rcfile {.joy2keyrc} ] [ -config {no default} ] [ -autorepeat {(freq) 5} ] [ -deadzone {(percent) 50} ] note: [] denotes `optional' option or argument, () hints at the wanted arguments for options {} denotes default (compiled-in) parameters (note: defaults may have been changed by editing joy2key.c) DESCRIPTION
joy2key monitors the joystick (normally /dev/input/js0) and sends keyboard events to an X window, terminal, or raw console. In the case of X, xwininfo(1) is used to retrive the window ID, which should not be a problem as this is a standard utility in most X11 distributions. To find the symbolic name of a particular key, see include/X11/keysymdef.h. In terminal mode, joy2key sends the ascii character given on the command line (that is, "joy2key -buttons a" means send lowercase 'a' when the first joystick button is pushed). In raw console mode, please consult the document "rawscancodes" included in this distribution for the proper scancodes. Options -X Send X events. May be compiled out of your copy of joy2key. -rawconsole For SVGALIB and similar programs that put the keyboard in raw mode. Sends scancodes. May be compiled out of your copy of joy2key. -terminal Send ascii characters. May be compiled out of your copy of joy2key. -axis Specifies actions to send when passing low/high values for each axis. Specified in pairs, from axis0 ... axisN, that is, the X axis is axis0, then the Y axis (axis1), then if you have a joystick hat that may be axis 2 and 3, etc. To figure out which axis is which, use the jstest program that comes with the joystick driver. -buttons Similar to -arrows, but for buttons. Goes from button0 ... buttonN, specifying key to send for each button on joystick. Use the jstest program to determine the numbering for each button. -thresh Specifies low/high thresholds to use (i.e. at what point moving the stick or pressing the gamepad triggers an event) in pairs, for each joystick axis. -dev Specifies joystick device to use. Defaults /dev/input/js0 (first joystick) -autorepeat Turns on and optionally specifies autorepeat frequency, i.e. the number of times per second a button which is held down will be repeated. -deadzone Controls sensitivity when manually calibrating. -rcfile Sets the rc file to look in. -config Reads in a config in an rc file. FILES
/dev/js[01] The joystick driver. Must be installed for joy2key to work. Joy2key only supports versions 1.0+ of the joystick driver. Older versions of joy2key use the 0.8.0 joystick driver. If for some reason a 1.0+ joystick driver does not work for you, use joy2key 1.2. The Linux joystick driver is available at ~/.joy2keyrc Rc file searched for commands in -config. The joy2key homepage is located at: BUGS
I don't like writing man pages, so this man page may be buggy :) COPYING
This is free software under the GNU General Public License. See COPYING in the archive to more information. 17 August 1998 JOY2KEY(1)

Check Out this Related Man Page

glutJoystickFunc(3GLUT) 					       GLUT						   glutJoystickFunc(3GLUT)

glutJoystickFunc - sets the joystick callback for the current window. SYNTAX
void glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); ARGUMENTS
func The new joystick callback function. pollInterval Joystick polling interval in milliseconds. DESCRIPTION
glutJoystickFunc sets the joystick callback for the current window. The joystick callback is called either due to polling of the joystick at the uniform timer interval specified by pollInterval (in millisec- onds) or in response to calling glutForceJoystickFunc. If the pollInterval is non-positive, no joystick polling is performed and the GLUT application must frequently (usually from an idle callback) call glutForceJoystickFunc. The joystick buttons are reported by the callback's buttonMask parameter. The constants GLUT_JOYSTICK_BUTTON_A(0x1), GLUT_JOYSTICK_BUT- TON_B(0x2), GLUT_JOYSTICK_BUTTON_C(0x4), and GLUT_JOYSTICK_BUTTON_D(0x8) are provided for programming convience. The x, y, and z callback parameters report the X, Y, and Z axes of the joystick. The joystick is centered at (0,0,0). X, Y, and Z are scaled to range between -1000 and 1000. Moving the joystick left reports negative X; right reports positive X. Pulling the stick towards you reports negative Y; push the stick away from you reports positive Y. If the joystick has a third axis (rudder or up/down), down reports negative Z; up reports positive Z. Passing a NULL func to glutJoystickFunc disables the generation of joystick callbacks. Without a joystick callback registered, glutForce- JoystickFunc does nothing. When a new window is created, no joystick callback is initially registered. LIMITATIONS
The GLUT joystick callback only reports the first 3 axes and 32 buttons. GLUT supports only a single joystick. GLUT IMPLEMENTATION NOTES FOR X11 The GLUT 3.7 implementation of GLUT for X11 supports the joystick API, but not joystick input. A future implementation of GLUT for X11 may add joystick support. GLUT IMPLEMENTATION NOTES FOR WIN32 The GLUT 3.7 implementation of GLUT for Win32 supports the joystick API and joystick input, but does so through the dated joySetCapture and joyGetPosEx Win32 Multimedia API. The GLUT 3.7 joystick support for Win32 has all the limitations of the Win32 Multimedia API joystick support. A future implementation of GLUT for Win32 may use DirectInput. SEE ALSO
glutForceJoystickFunc, glutMotionFunc, glutMouseFunc, glutSpaceballButtonFunc, glutSpaceballMotionFunc, glutButtonBoxFunc, glutTabletBut- tonFunc, glutDeviceGet AUTHOR
Mark J. Kilgard ( GLUT
3.7 glutJoystickFunc(3GLUT)
Man Page

Featured Tech Videos