Repository navigation
3d_mouse
A 3Dconnexion 3D mouse β SpaceMouse, SpacePilot, SpaceNavigator and the like β can pan and zoom QElectroTech's sheets and the element editor with one hand, leaving the other on the ordinary mouse for drawing. Its buttons can run any QElectroTech command that has a keyboard shortcut.
Support was asked for, and is still discussed, in discussion #599. Reports from real devices are welcome there: see Β§6.
| On the device | In QElectroTech |
|---|---|
| Slide the cap left/right, forward/back | pans the view |
| Push/pull the cap (default), or twist it (setting) | zooms |
| Tilt | nothing |
| A button | the command you bound to it, if any |
It acts on whichever window is in front: the current sheet of the schematic editor, or the element editor's drawing. Zoom stops at the same limits as the mouse wheel.
Nothing happens on a button press until you bind that button (Β§3). There is no default binding.
3D mouse support is a compile-time option, off by default. How the device is read depends on the build:
| Build | Reads the device through | Needs |
|---|---|---|
| Windows package | USB directly (hidapi) | nothing extra; no 3Dconnexion driver is required |
| macOS package | 3DxWare when it is installed and running, otherwise USB directly | nothing extra |
| Flatpak | USB directly (hidapi) | read access to /dev/hidraw*, see Β§5 |
| Snap | spacenavd | the spacenavd daemon running |
| Linux distribution packages, own builds | whatever the packager chose | see Β§7 |
If the 3D mouse page is missing from the preferences (Β§3), your build does not have 3D mouse support.
On macOS, while QElectroTech is the front application, 3DxWare's own actions are switched off in it, so the view does not move twice.
Settings β Configure QElectroTech, page 3D mouse.
| Setting | Range | Default | Does |
|---|---|---|---|
| Pan speed | 10β400 % | 100 % | how fast the view pans |
| Zoom speed | 10β400 % | 100 % | how fast it zooms |
| Zoom by | Push / pull the cap, Twist the cap | push/pull | which movement zooms |
| Dead zone | 0β200 | 0 | movements smaller than this are ignored; raise it if the view drifts while you are not touching the device |
| Reverse horizontal movement | on/off | off | reverses left/right |
| Reverse vertical movement | on/off | off | reverses forward/back |
| Reverse zoom | on/off | off | reverses zoom in/out |
The speed on screen does not depend on how often the driver sends updates, so the same setting feels the same on every system. An equal push and pull cancel out exactly.
A table of button number β command:
- Click Add a link.
- Set Button no to the button's number.
- Pick the command under Action. The list holds every command that has a shortcut in QElectroTech, grouped by editor.
- Click OK to save.
The number a button sends depends on the device and on how it is read. The device's documentation may give it; otherwise try 0, 1, 2β¦ in turn. The button at the end of a row removes the binding.
In QElectroTech's own settings, not in any project: under spacemouse/motion/
for the motion settings and spacemouse/buttons/ for the bindings. They apply
to every project, and to both editors.
| Symptom | Check |
|---|---|
| No 3D mouse page in the preferences | the build has no 3D mouse support: Β§2 |
| Snap: the device does nothing |
spacenavd is installed and running (systemctl status spacenavd) |
| Flatpak: the device does nothing | your user can read the device: ls -l /dev/hidraw*. On many distributions these nodes are readable by root only, and a udev rule is needed (below) |
| The view drifts on its own | raise Dead zone |
| It moves the wrong way | the Inverser⦠settings |
| A button does nothing | it is not bound yet, or bound to the wrong number: Β§3 |
A udev rule giving the logged-in user access to 3Dconnexion devices, for the
Flatpak or any build using the USB backend on Linux. Save it as
/etc/udev/rules.d/70-3dmouse.rules:
KERNEL=="hidraw*", ATTRS{idVendor}=="256f", TAG+="uaccess"
KERNEL=="hidraw*", ATTRS{idVendor}=="046d", TAG+="uaccess"
256f is 3Dconnexion; 046d is Logitech, which sold the older models. Then
run sudo udevadm control --reload && sudo udevadm trigger and replug the
device. QElectroTech looks for a device every three seconds, so it does not
need restarting, and it reconnects on its own after the device is unplugged.
The USB backend decodes each device model's raw reports itself. A short
recording from a real device lets that model be tested. The script
misc/spacemouse-capture.py in the source tree guides you through a few
movements, saves one .json file, and sends nothing anywhere. It runs on
Linux, macOS and Windows with only Python 3.
curl -LO https://raw.githubusercontent.com/qelectrotech/qelectrotech-source-mirror/master/misc/spacemouse-capture.py
python3 spacemouse-capture.py --help # step-by-step instructions for your system
python3 spacemouse-capture.py --seconds 3 # record, three times the default time per stepOn Linux, run it with sudo, for the reason in Β§5. Attach the file to
discussion #599.
One recording per device model is enough.
Two CMake options:
| Option | Values | Default |
|---|---|---|
QET_ENABLE_SPACEMOUSE |
ON, OFF
|
OFF |
QET_SPACEMOUSE_BACKEND |
auto, spnav, hid
|
auto |
| Backend | Reads through | Library (pkg-config) |
|---|---|---|
spnav |
the spacenavd daemon, Linux |
libspnav-dev (spnav) |
hid |
USB directly, any system |
libhidapi-dev on Linux (hidapi-hidraw), MSYS2 mingw-w64-ucrt-x86_64-hidapi, Homebrew hidapi
|
auto |
spnav on Linux when libspnav is found, hid otherwise |
On macOS the 3DxWare backend is always added as well. It loads 3DxWare's library at run time and needs nothing to build.
cmake -B build -DQET_ENABLE_SPACEMOUSE=ON -DQET_SPACEMOUSE_BACKEND=hidIf the chosen backend's library is not found, CMake prints a warning and builds
without 3D mouse support rather than failing. Check the configure output
for a line like QET_ENABLE_SPACEMOUSE ON (backend: hidapi 0.14.0).
| Limitation | Detail |
|---|---|
| Pan and zoom only | tilting the cap does nothing; there is no rotation of the sheet |
| Button numbers are raw | there is no "press the button to bind it"; find the number by trying |
| 3DxWare app events | on macOS, only raw button presses are read, not the named actions newer 3DxWare versions send |
| Hardware coverage | tested on the devices reported in discussion #599; other models may need a recording (Β§6) |
- Preferences reference β the other preference pages
- Finding your place on a sheet β going to a cell, keeping the headers in sight
- Keyboard-only control β the commands a button can be bound to
- Building from Source β the full build instructions
Getting Started
π Languages β English Β· FranΓ§ais Β· Deutsch
Windows without admin rights β the portable archive, no installer
Guides
Conductors β wire properties, what feeds which export, cables, and hops where wires cross
Wires per terminal β limit the wires on a terminal, chain wiring instead of stars
Printing and exporting β paper, PDF, images, and what each path does differently
Linking elements β master, slave, terminal
PLC modules β I/O tables and linking a wire to a specific point
Using the element editor β drawing tools, saving, checks
Generic devices β a quick box symbol with terminals on any side, made by a wizard (pending)
Grid size and element size β why symbols aren't all the same scale, and scaling one without leaving the grid
Preferences reference β what each settings page does
Saving and loading settings β your whole setup in one file, to copy or keep
Keyboard-only control β mouseless QET, and what still needs a mouse
Mouse modifiers β what Shift, Ctrl and Alt change while you drag
3D mouse β SpaceMouse pan, zoom and buttons
Aligning items β snap symbols back to the grid, or line them up
Pictures on a sheet β labels, crop, transparency, what they cost in the file
Arcs and curved wires β the Arc tool, pulling an arc in or out, rounding a corner with a fillet, dashed arcs for lighting layouts
Grouping items β select, move and copy several items as one
Finding your place on a sheet β go to a cell like B13 or 4-B7, keep the headers in sight, show the cell limits, zoom and pan
Showing and hiding kinds of items β hide texts, wire numbers, shapes, pictures, tables or cross-references on every sheet
Drawing faster β place without dragging, the S shortcut bar, command search, gestures
Customising QElectroTech β keys, toolbar size and contents, the gesture ring (partly pending)
Managing collections β folders, writability, building your own shortlist
Templates β reusable multi-element blocks, placed by double-click or drag
Search & Replace β bulk property changes
Building a nomenclature query β the BOM/summary table builder
Linking wires across pages β sheet reports
Variables & formulas β %f, %{label}, sequences
Auto-numbering β schemes, sequences, freezing
Terminal strips β strips, levels, bridges
Title block templates β the .titleblock format
Importing EPLAN parts (.edz) β EPLAN Data Portal
DXF import & export β two unrelated features, one format; command-line export and layers
The project database β the in-memory SQLite cache
Development
Automating QET β CLI, XML formats, external tools
CLI Reference β command line usage
JavaScript Scripting β --run, geometry editing, undo
MCP server β let an AI assistant read, verify and edit projects
Connecting an AI assistant β setup for Claude, Copilot, Gemini, Codex, Cursor, LM Studio
Script buttons β stored scripts with an icon, by hand or by an assistant
Live mode β an assistant working in the open project while you watch
Macro recorder β record a task by hand, for an assistant to script
Vision β proposal, under discussion
