[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] How to catch SpaceMouse events?



Hi,

I was already trying to post this mail yesterday via gmane, but it didn't seem to get through, so I'm trying again via email. My apologies if you see this mail twice.

I'm trying to use a SpaceMouse in a pygame application via the SDK provided by 3Dconnexion (www.3dconnexion.com). So far, I'm on WinXP using pygame 1.6.2 and Python 2.3 (but if I get it to work on Windows, I'd like to do the same on Linux as well).
Using the SpaceMouse API involves the following steps:


1) Opening the device which takes a window handle as input. The driver will then send the messages from the SpaceMouse to the specified window.

2) Receiving the window messages and checking if it was a SpaceMouse event or a regular event.

Thanks to the new get_wm_info() function in pygame 1.6.2 the first step is no problem. However, I don't receive any events from the SpaceMouse. I only get the regular events. What I would need is the raw message that the window has received, including the wParam and lParam parameters.

So the question is: Is there a way to obtain this event information? (What does SDL do with events that it doesn't know?)

- Matthias -