From all available backends they are tried in the order: evdev, linux joystick, bsd
usbhid. This needed to separate the backends which were usually used to replace each
other.
The configure script now checks for availability of several backends like Linux's
joystick, Linux's evdev, BSD's usbhid. This way several backends can be compiled in and
used with the same binary module.
Backend selection code still missing!
So far the autorepeat settings of xorg were used, thus sharing the settings with all other keyboard. This is still the default but the
rate and delay can be changed per device, not conflicting with the settings of other keyboards.
To look up Keysyms from Strings the method XStringToKeysym comes in handy, which would
require linking against libX11. By integrating the method in the module, this can be
avoided until similar functionallity get's included in xorg-server.
keyhigh values in xorg.conf from scancodes to keysyms!
New xorg-server 1.4 fixes a lot of keyboard things. This makes it necessary to
provide an own mapping rather than using the mapping of the current keyboard. A
keymap is built dynamically from the options provided. The options now need to
provide a keysym for each button instead of the scancodes of another keyboard
attached keyboard.
The options --enable-debug and --disable-debug control if additional debugging messages shall be included in the binary, that can made
visible with the "DebugLevel" option in the xorg.conf. Default: Enabled.
If axis is set to relative and keylow and keyhigh are assigned, autorepeat for these keys is emulated with a speed relative to the
value of the axis (keydown and keyup are generated frequently). A factor for this autorepeat speed can be assigned by
"axis=<factor>key".
If mode is "accelerated", the axis behaves like a button: only one keydown and one keyup, X does autorepeat for the key.
Button mapping without amplify value like "axis=x" used uninitialized value for amplify,
making an amplify value mandatory. With no amplify value, 1.0 is assumed.
Instead of using one global subpixel variable for all axes and buttons, the axis/button
struct for each axis/button holds it's own subpixel variable. This is neccessary to
implement mapping of relative axes to keys, which needs to save own "subpixel" values.
Large parts of the code were written with 2-space-indents only.
Upgraded to 4-space indents to improve readability. Sorry for touching almost
every line. :-S
One can specify scancodes for negative and positive axis movement. When the axis is moved out of the deadzone,
keydown events are once generated, and keyrelease events are generated when the axis returns to 0.
One can map a pad to the four arrow keys to play games that do not support a joystick.
Debugging messages about loading and unloading the module were printed
every time, before debug_level could be set. Removed the messages
completely, because they use nobody except me.
Only report correct amount of buttons to xorg-server-1.3
Call InitButtonClassDeviceStruct with right number of buttons and right mapping. Works correctly
since xorg-server-1.3.
The XFree86LOADER is mandatory, without it it wouldn't compile anyway, so checks were deleted.
Named structs in jstk.h again
Added unions for mapping-relative data, given values more telling names