SpaceNav WebSocket Bridge for using a 3dConnexion spacemouse with onshape
Project description
Websockets exposer for the spacenav driver (spacenav‑ws)
Table of Contents
About
spacenav‑ws is a tiny Python CLI that exposes your 3Dconnexion SpaceMouse over a secure WebSocket, so Onshape on Linux can finally consume it. Under the hood it reverse‑engineers the same traffic Onshape’s Windows client uses and proxies it into your browser.
This lets you use FreeSpacenav/spacenavd on Linux with Onshape.
Prerequisites
- uv/uvx or another Python env manager.
- A running instance of spacenavd
- A modern browser (Chrome/Firefox) with a userscript manager (Tampermonkey/Greasemonkey)
Usage
- Validate spacenavd
uvx spacenav-ws@latest read-mouse
# → should print spacemouse events
- Run the server and trust the cert
uvx spacenav-ws@latest serve
Now open: https://127.51.68.120:8181 Add a browser exception for the self‑signed cert.
- Install Tampermonkey and add the userscript
Install Tampermonkey. After installing, click this link for one‑click install of the script.
Developing
git clone https://github.com/you/spacenav-ws.git
cd spacenav-ws
uv run spacenav-ws serve --hot-reload
This starts the server with Uvicorn's code watching / hot reload feature enabled.
Deploying to pypi
Just run
uv build
uv publish
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters