XInput support on X windows (e.g. 3Dconnection Space Navigator)

39 views
Skip to first unread message

Andrew Straw

unread,
Mar 30, 2008, 2:20:10 AM3/30/08
to pyglet...@googlegroups.com
Hi pyglet-eers,

The attached patch adds xinput support for pyglet (X windows only). It
allows one to manipulate 3D scenes with, for example, a 3Dconnection
Space Navigator[1] when it is configured as an XInput device[2] on
GNU/linux or other Xorg systems.

[1] http://www.3dconnexion.com/
[2] http://www.fedorawiki.de/index.php/SpaceNavigator (in German)

I believe that the patch supports all 6 DOF and 2 buttons of the Space
Navigator device in a way which should generalize to other XInput
devices. There is more that XInput is capable of doing than I have
implemented, simply because I do not have devices to use for these
functions.

As noted in the source code, this patch is licensed under the BSD
license, and is thus suitable for inclusion in pyglet from that
standpoint. This is, however, completely non-cross-platform, so there
are other issues from that perspective.

Anyhow, I hope this is useful or fun for someone.
-Andrew

pyglet-xinput.patch

Andrew Straw

unread,
Mar 30, 2008, 3:26:59 PM3/30/08
to pyglet...@googlegroups.com
I have gone ahead and made a separate package out of this:
http://code.astraw.com/projects/motmot/wiki/pygxinput
Reply all
Reply to author
Forward
0 new messages