SpacePilot Pro use with Linux

Questions and answers about 3Dconnexion devices on UNIX and Linux.

Moderator: Moderators

Post Reply
Timmchugh11
Posts: 2
Joined: Sun Feb 17, 2019 12:33 pm
Contact:

SpacePilot Pro use with Linux

Post by Timmchugh11 » Sun Feb 17, 2019 12:53 pm

Hello

I thought I would share a small project I've been working on this weekend, I was offered a SpacePilot Pro from work for a ridiculously cheap price. I thought I would have a play with it see if I could use it for more than just blender, as I don't use blender...

I tried the official drivers but they didn't seem to work very well with Mint 19, even just for the button control. So I started looking for an alternative way to use the SpacePilot for macros and possibly with the web interface of Fusion 360.

So far I have made a script that runs on startup that looks for the ID's of the SpacePilot Pro and uses them as a joystick and second keyboard for the buttons, from this I then use QJoyPad to map the axis to mouse axis, and actkbd to use the buttons as macros to run scripts or execute commands. I used the sticky keys function to allow me too use the 6Dof sensor to pan and orbit in fusion.

For this to work you will need:
'light' for haikarainen on github, to control the blue led
'jscal'
'qjoypad'
'actkdb'

Code: Select all

#!/bin/sh
id=`xinput list | grep SpacePilot | sed 's/.*id.//' | awk '{print $1}'`
led=`light -L | grep misc  | sed 's/.*sys/sys/'`
event=`cat /proc/bus/input/devices | sed -n '/Space/,/^$/p' | grep -o event..`
sudo MAKEDEV js &
xinput set-prop $id "Device Enabled" 0
jscal -s 6,1,0,0,0,1335459,1373029,1,0,0,0,-1287421,-1073709,1,0,0,0,-1116122,-1483024,1,0,0,0,-1287421,-1162023,1,0,0,0,-1342136,-1542685,1,0,0,0,1338789,1296750 /dev/input/js1
qjoypad &
light -Srs "$led" 1
actkbd -s -d /dev/input/$event &
I hope people find this helpful.

Post Reply