In 2007 I took over maintainership of the X.Org joystick input module as part of my final paper for the Bachelor study. The module was in pretty bad shape, without a maintainer and would have only offered very few features, if it worked at all.
During my study and beyond I fixed the module and added features which I thought were important. The module is open source, living inside the main X.Org git repositories and is regularly shipped and packed with the respective distributions.
In late 2007 the module gained hotplug support through evdev/hal/udev, so it can easily be aware of hardware or software configuration changes.
The module also has a limited support for running under a FreeBSD kernel.
Using the xf86-input-joystick module you can use joysticks as a mouse replacement in X.Org. Applications do not need to be changed, since the module maps joystick events to normal pointer movement but can also emit keyboard events. For example, it is possible to map the “Alt+Tab” key combination to a joystick button of your choice, as well as generate multimedia key events to control volume.
Please refer to the man page for available features and configuration examples.