Hello,
I'm using a SpacePilot and try to write some small demos for it. What I've recognized is that many features are not covered in the API (such as sending a custum configuration and stuff). Also it seems that button handling works different for the space pilot. Normally in the magellan-driver lib a ButtonPressEvent-Atom is send/received (according to the API), but here nothing happens when I press a button. Instead I have to listen for Events from type KeyPress/KeyRelease which then contain the key information... This wouldn't be too bad if it also worked for the "Sensitivity-/+-Buttons".
Is there any recent SDK which covers the features of the space pilot?
If not - does someone know what I did wrong with the button stuff and how I can get to the state of the +/--Buttons?
Thanks in Advance,
Joachim
SDK for the SpacePilot
Moderator: Moderators
Re: SDK for the SpacePilot
Hi Joachim,
you should get the ButtonPress/ReleaseEvent Atoms if there is no mapping on the buttons. This is the case if you set the mapping of a button to "Button x" where x is the number of the button.
But the buttons +, -, Dom, Config and 3DLock are not re-programmable. For those the mapping is fix. Try it with any of the programmable buttons to see if you get the Atoms correctly. Would be nice if you post your results here.
Uta Ludwig
3Dconnexion
you should get the ButtonPress/ReleaseEvent Atoms if there is no mapping on the buttons. This is the case if you set the mapping of a button to "Button x" where x is the number of the button.
But the buttons +, -, Dom, Config and 3DLock are not re-programmable. For those the mapping is fix. Try it with any of the programmable buttons to see if you get the Atoms correctly. Would be nice if you post your results here.
Uta Ludwig
3Dconnexion
Hello,
Thanks for the reply. The buttons were on "Custom 1" - "Custom 6" when I tested it. Now with "Button 1" - "Button 6" things are working.
Currently I'm trying to make the thing window independent, so the window that is passed to the driver to receive the events is an invisible InputOnly-window. Does this have any sideeffect? What I realized at the moment is a problem using more than one window that requires the device. An invisible window doesn't have a way of reporting a focus lost/grab. So is there any other way to read the currently served window from the spacepilot driver or something like that?
Regards,
Joachim
Thanks for the reply. The buttons were on "Custom 1" - "Custom 6" when I tested it. Now with "Button 1" - "Button 6" things are working.
Currently I'm trying to make the thing window independent, so the window that is passed to the driver to receive the events is an invisible InputOnly-window. Does this have any sideeffect? What I realized at the moment is a problem using more than one window that requires the device. An invisible window doesn't have a way of reporting a focus lost/grab. So is there any other way to read the currently served window from the spacepilot driver or something like that?
Regards,
Joachim
Last edited by Camael on Tue Jan 08, 2008 1:57 pm, edited 3 times in total.
Hello Joachim,
There could be a focus problem if you use an invisible window (see here) We are working on this.
No, you can not get this information from the driver. If you set the event window with MagellanSetWindow() you can use this information. But as I mentioned before: there is an issue with this and you should just be patient until we have further information. Just check the above mentioned post.
Uta
3Dconnexion
Camael wrote:Currently I'm trying to make the thing window independent, so the window that is passed to the driver to receive the events is an invisible InputOnly-window. Does this have any sideeffect?
There could be a focus problem if you use an invisible window (see here) We are working on this.
To load the appropriate configuration the driver reads the name of the window (class name, resource name or window name) which has the input focus. In your own configuration file you can put more than one window name that is used to identifiy the application.Camael wrote:What I realized at the moment is a problem using more than one window that requires the device. An invisible window doesn't have a way of reporting a focus lost/grab.
- APP_WINDOW_NAME = { "WinName1", "WinName2" }
Camael wrote:So is there any other way to read the currently served window from the spacepilot driver or something like that?
No, you can not get this information from the driver. If you set the event window with MagellanSetWindow() you can use this information. But as I mentioned before: there is an issue with this and you should just be patient until we have further information. Just check the above mentioned post.
Uta
3Dconnexion