From 32c6ba4c292957e40ec349a4bb993b6ad92f290b Mon Sep 17 00:00:00 2001 From: Sascha Hlusiak Date: Wed, 8 Aug 2007 15:00:15 +0200 Subject: Added example about mapping axes to keys to manpage. --- man/joystick.man | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'man/joystick.man') diff --git a/man/joystick.man b/man/joystick.man index b76d618..0544d82 100644 --- a/man/joystick.man +++ b/man/joystick.man @@ -139,6 +139,8 @@ defines the keys to be generated when the axis is moved in negative direction (i .B keyhigh defines the keys to be generated when the axis is moved in positive direction (ie. right or down). +The keys will be autorepeated according to current keyboard settings. + See special section about key events below. .TP 7 .BI "\*qdeadzone=" \*q @@ -205,11 +207,11 @@ total range of 200 pixels, 100 to the top and 100 to the bottom: .SH "GENERATING KEY EVENTS" Proving a \*qkey=[,[...]]\*q option will generate X Events with the specified keycodes in order, -when the joystick button is pressed. When the button is released, the keys are released in the reverse order. +when the joystick button is pressed or the axis changed it's position. When the button/axis is released, the keys are released in the reverse order. To lookup keycodes for KeySyms, you can use .BR "xmodmap -pk" . -You can use unused keycodes and map them to a KeySym of your choice using xmodmap(1). You can specify up to 4 -keycodes per joystick button. +You can use unused keycodes and map them to a KeySym of your choice using xmodmap(1). +You can specify up to 4 keycodes per joystick button/axis. Examples: .nf @@ -231,6 +233,16 @@ will generate a lowercase is for the .IR "space " key. +.nf +.BI " Option \*qMapAxis1\*q \*q" "mode=accelerated keylow=100 keyhigh=102" \*q +.BI " Option \*qMapAxis2\*q \*q" "mode=accelerated keylow=98 keyhigh=104" \*q +.fi +will map the first axis to the arrow keys +.IR left " and " right +and the second axis to the arrow keys +.IR up " and " down . +The keys are generated once when the axis moves out of the deadzone and when it moves back into the deadzone. X.Org will autorepeat those keys according to current keyboard settings. + .SH "VALUATORS" The driver reports relative cursor movement as valuators 0 and 1. -- cgit v1.2.3