I created libsixdof to help map from XInput events generated by the spacenavigator into application actions. As the default events are absolute from X and relative events are much easier to work with libsixdof maps axis movements into relative from -1.00 to +1.00 and handles a customizable dead zone etc.
I have a patch for kphotoalbum svn (see their mailing list) and feh from cvs contains support for libsixdof. Things are still simple there, but you can zoom, pan, move through slideshows, rotate the image using a spacenavigator. I've yet to attack the gimp but that should be fun when it happens.
What follows is the bulk of the README from libsixdof.
libsixdof provides a C and C++ interface to 6 degrees of freedom
devices.
The library is intended to be very unintrusive to an application
allowing support to be implemented without great effort. For example,
an application might only need to issue 3-4 API calls to tell
libsixdof about Xwindow objects that it should monitor. Apart from
those setup calls, functions that are useful for controllers should be
registered with libsixdof. The configuration of the device, how its
axis movements map to these registered functions is then taken care of
completely from the libsixdof code. The application doesn't really
need to care what 6dof device is attached, where it is attached (usb
etc) or what its name is, or if there are more than one such device.
Having the configuration of controller movement to function being
performed in libsixdof itself allows the user to setup modal 6dof use
and other complex configurations for their applications. For example,
having x-axis movement flick through a slideshow, except when the
first side button has been pressed, in which case x-axis movement does
something different until z-axis movement changes back to the main
mode.
Though this modal engine is not implemented at version 0.0.1 of the
library, it is planned that a state engine can be added to libsixdof
to allow very complex setups like this. Such a level of customization
is unlikely to be desired by somebody writing an audio player or image
viewer who does not own a 6dof device themselves. But a patch with a
few scattered 6dof calls and a function table is likely to be accepted
by such application authors.
I have released this under many licenses because I just dont want the
crap about not being able to use libsixdof with all my apps. I like
the GPL myself but as there are applications which are not compatible
with GPL that I want to use 6dof devices to control I made the library
fairly wide open in licensing so that it can become the initial
widespread standard for 6dof controllers on Linux... maybe. Hey, you
are welcome to produce a better library

To control an application you must setup bindings in ~/.libsixdofrc.
A sample is provided with the distribution with settings for the
examples in the distribution as well as feh and other applications
that I have hacked optional 6dof support into. Perhaps in the future
applications will themselves contain sample inputrc files, but for
now I am maintaining a central repository for rc files. You can setup
thresholds that will effect how much axis movement will be reported
to an application. For example, using a SpaceNavigator with the gimp
Input module trying to zoom in using the z-axis will not work well
because it is too quick. With libsixdof you can control how sensitive
each axis movement, tilt and rotation will be.
Currently support is limited to the SpaceNavigator when it is setup
to send XInput events. This setup can be done by adding the following
to your xorg.conf file.
Section "ServerLayout"
...
InputDevice "SpaceNavigator"
...
EndSection
Section "InputDevice"
Identifier "SpaceNavigator"
Driver "evdev"
Option "Name" "3Dconnexion*"
Option "Pass" "3"
Option "Mode" "Relative"
Option "XRelativeAxisMap" "0"
Option "YRelativeAxisMap" "1"
Option "ZRelativeAxisMap" "2"
Option "RXRelativeAxisMap" "3"
Option "RYRelativeAxisMap" "4"
Option "RZRelativeAxisMap" "5"
Option "ZRelativeAxisButtons" "off"
EndSection