SpacePilot Pro buttons are not working

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
dennisb
Posts: 9
Joined: Sat Nov 14, 2020 11:19 am

SpacePilot Pro buttons are not working

Post by dennisb »

I use a 3dconnexion SpacePilot Pro in linux and navigation work well but the buttons do not. The 3DConnexion.xml file list the same keycode twice, one for a short press and one for a long press. On my machine I get different keycodes when doing a short press vs a long press.

I can fix the definitions and make it work for me in Linux but maybe it work differently on Mac/Windows and would break over there? Is there anyone here that use a SpacePilot Pro where the buttons work (in any OS)?

/Dennis
User avatar
M4x
Veteran
Posts: 1486
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: SpacePilot Pro buttons are not working

Post by M4x »

I have a "normal/small" SpaceMouse and the buttons are working. Can we get some more information? Which Linux, which FC version, which driver, do you know if the system recognizes the buttons?
dennisb
Posts: 9
Joined: Sat Nov 14, 2020 11:19 am

Re: SpacePilot Pro buttons are not working

Post by dennisb »

Well, the button works but generate different keycodes than what is listed in the xml file in Freecad.

For example, in Freecad it is defined (for SpacePilot Pro) as:

Code: Select all

      <Map Description="Right"         KeyCode="4"  DownTime="short" Command="Std_ViewRight"/>
      <Map Description="Left"          KeyCode="4"  DownTime="long"  Command="Std_ViewLeft"/>
but here the button labeld R/L generate KeyCode 4 on short press (R) and KeyCode 3 on long press (L). If I update the XML with the correct values from my system all works well. I also don't see any code that make use of the DownTime property in FC so unless I miss something it look like it can't work for buttons with two operations on them.

This is on a Fedora 33. Both in FC 0.19 and the master branch from git and using spacenavd that came with Fedora 33.

/Dennis
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: SpacePilot Pro buttons are not working

Post by heda »

hm, so what is future proof would be a macro or similar that is picking up the machine specific congfig then, if the provided defaults does not map correctly?
like one of those "calibration" screens where the user can connect movement and button presses for their particular set-up.

just a random thought...
User avatar
M4x
Veteran
Posts: 1486
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: SpacePilot Pro buttons are not working

Post by M4x »

The idea of a long press detection would be nice too indeed :)
dennisb
Posts: 9
Joined: Sat Nov 14, 2020 11:19 am

Re: SpacePilot Pro buttons are not working

Post by dennisb »

With these changes the SpacePilot Pro works fine on my system:

https://github.com/FreeCAD/FreeCAD/pull/4924

Maybe it can help others that have the same device as well.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: SpacePilot Pro buttons are not working

Post by yorik »

Can anyone else with a SpacePilot Pro test the proposed changes?
User avatar
M4x
Veteran
Posts: 1486
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: SpacePilot Pro buttons are not working

Post by M4x »

I might be able to borrow one. I'll see what I can do.
User avatar
M4x
Veteran
Posts: 1486
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: SpacePilot Pro buttons are not working

Post by M4x »

Looks like I'm going to get one but I can't say when. Currently all "free" units are in use. I have to wait.
User avatar
M4x
Veteran
Posts: 1486
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: SpacePilot Pro buttons are not working

Post by M4x »

I was able to borrow one :mrgreen:
Now I've to look into compiling FreeCAD myself. I haven't done that so far (I'm on Linux).
Post Reply