Skip to content

Linux integration / With OnShape - #40

Open
spikeon wants to merge 6 commits into
sb-ocr:mainfrom
spikeon:pr/linux-integration
Open

spikeon wants to merge 6 commits into
sb-ocr:mainfrom
spikeon:pr/linux-integration

Conversation

@spikeon

@spikeon spikeon commented Jun 17, 2026

Copy link
Copy Markdown

I have spent the last couple of days making this work on my Arch Linux install and I figured that I should share the results so others don't have to spend as long as I did figuring this out.

Note that my integration is OnShape specific, so others may want to add-on to this with their 3D software of choice.

spikeon and others added 6 commits June 17, 2026 17:00
Firmware changes:
- Spoof VID/PID as SpaceMouse Compact (256f:c635) for spacenavd compatibility
- White LEDs at full brightness, sleep timeout disabled

linux/ directory — full setup for Linux/Wayland + OnShape:
- install.sh: automated installer
- spnav-buttons: hidraw-based button mapper (scroll up/down, chord Shift+7)
- patch-spacenav-ws.py: disables button-snap in spacenav-ws
- onshape-spacenav.user.js: Tampermonkey userscript (fakes Win32 platform)
- systemd user services: ydotoold, spacenav-ws, spnav-buttons
- udev rules: auto-restart services on plug, hidraw permissions
- spnavrc: tuned sensitivity defaults

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- udev: delayed restarts via systemd-run --on-active (2s for spacenavd,
  3s for spnav-buttons) to avoid race condition where spacenavd starts
  before the USB device finishes enumerating
- udev: remove spacenav-ws from restart rule — it reconnects automatically
- spacenav-ws patch: also patch main.py nlproxy to reconnect to spacenavd
  socket on disconnect, keeping the OnShape WebSocket alive through replugs
  (no tab refresh needed after device unplug/replug)
- spacemouse-status: colour health check for all components

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keeping only the sleep timeout and VID/PID changes relevant to Linux.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The VID/PID spoof is documented in linux/README.md as a manual step —
not distributed as a default firmware change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@spikeon

spikeon commented Jun 18, 2026

Copy link
Copy Markdown
Author

There is a successor to this but it went a little overboard for merging it into this project:

https://github.com/spikeon/linapse-cad-mouse-v2

I built out a full synapse styled web configuration tool for it.

screencapture-localhost-7892-2026-06-18-05_19_28 screencapture-localhost-7892-2026-06-18-05_18_21 screencapture-localhost-7892-2026-06-18-05_17_42

@relikd relikd mentioned this pull request Jul 17, 2026
@relikd

relikd commented Jul 17, 2026

Copy link
Copy Markdown

driver support as in, you can push a button and perform actions in OnShape? If so, I bet people would be happy to have a FreeCAD integration :)

@spikeon

spikeon commented Jul 17, 2026

Copy link
Copy Markdown
Author

Ever use Razer Synapse? Kinda like that.

High level overview:

Profiles & Configurable Modes (Default, Browser, Media, Mouse, Controller, and custom modes)
Tap Gestures
On-The-Fly Configuration Changes
Macros
Wayland-Native Input Injection (Linux) & OS-Native Input Injection (Windows/macOS)
Live 3D Viewport Tuning
Interactive Motion Calibration Wizard
Addressable RGB LED Control
Web CAD Connector

Modes is my favorite; it can become a game controller in one mode and a volume knob in another mode. And each mode can have it's own lighting set so you can tell them apart at a glance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants