Skip to main content

SpaceNav WebSocket Bridge for using a 3dConnexion spacemouse with onshape

Project description

Websockets exposer for the spacenav driver (spacenav‑ws)

PyPI version Build Status License

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

  1. Validate spacenavd
uvx spacenav-ws@latest read-mouse
# → should print spacemouse events
  1. Run the server and trust the cert
uvx spacenav-ws@latest serve

Now open: https://127.51.68.120:8181. When prompted, add a browser exception for the self‑signed cert.

  1. Install Tampermonkey and add the userscript

Install Tampermonkey. After installing, click this link for one‑click install of the script.

  1. Open an Onshape document and test your mouse!

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. When making changes the server restarts and any websocket state is nuked, however, Onshape should immediately reconnect automatically! This makes for a very smooth and fast iteration workflow.

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

spacenav_ws-0.1.5.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacenav_ws-0.1.5-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file spacenav_ws-0.1.5.tar.gz.

File metadata

  • Download URL: spacenav_ws-0.1.5.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.14

File hashes

Hashes for spacenav_ws-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4f8ecc3ce98df5b84009ab6c85be3d386260d6bc5ba9037b0a686c0476924c69
MD5 283910ab0590ffadd6884643ecc867c8
BLAKE2b-256 8de5e74c9fb892d7778fb4f4de0edf3a9315e9e453b195a40eb21bf5904c4453

See more details on using hashes here.

File details

Details for the file spacenav_ws-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for spacenav_ws-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 83b251e12f9aade44030d38432a542e26ee3a31b76bfc7ec272ac2706ee3871e
MD5 fefdba5288fecd6ba56fe1fc8b8b06a7
BLAKE2b-256 5fb92f3239a0ffc3971d216aa4b2e257373d96883c7e6a7ffaf0157a80248d54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page