GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lomnido/pyspacemouse-to-trackpoint: use 3D mouse as 2D TrackPoint

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
trackpoint.py
trackpoint.py
 
 

Repository files navigation

Trackpoint out of 3D mouse

Python script that can use your 3D mouse as Trackpoint, kind of.

Features

  • waiting for USB device to connect, when it does,
    • check if it is 3D mouse compatible device (device support by Kuba Andrýsek)
    • when disconnected, it will wait for new connection again
  • move cursor around: Up, Down, Left, Right
  • left and right clicks like in real mouse
  • scroll up/down by using yaw (angle on the XY plane)
  • zoom-in/zoom-out by using z-axis (emulating CTRL + '+'|'-')
    • sensitivity can be changed by 'zoom_sens' variable; greater the number = greater force required
  • horizontal scroll (left/right) by: pushing (negative z-axis) and then move on x-axis will corespond to movement
    • sensitivity can be changed by 'hs_sens' variable; greater the number = more movement per 1 scroll point is required

Installation in Linux

# make sure you have these
apt install python3-dev
apt install python3-uinput
apt install python3-evdev
apt install python3-venv

# create and load virtual environment
python3 -m venv venv
source venv/bin/activate

# install dependencies inside virtual environment
pip install python-uinput
pip install easyhid
pip install evdev
pip install pyudev

# make sure kernel module is loaded
modprobe uinput

# it should be ready to run
python3 trackpoint.py

Usage

The package can be run directly to convert 3D mouse input into simulated input events:

python3 trackpoint.py

Dependencies

  • uinput (python-uinput 1.0.1)
  • evdev (1.9.1)
  • easyhid
  • pyudev
  • Python standard library (time, collections, etc.)

Supported Devices

  • SpaceMouse Enterprise
  • SpaceExplorer
  • SpaceNavigator
  • SpaceMouse USB
  • SpaceMouse Compact
  • SpaceMouse Pro Wireless
  • SpaceMouse Pro
  • SpaceMouse Wireless
  • 3Dconnexion Universal Receiver
  • SpacePilot
  • SpacePilot Pro

Huge Thanks to Kuba Andrýsek for the code regarding reading 3D mouse data, which was taken from his project pySpaceMouse.

System integration

is not supported by this project, however you can run this script after start. Script will run until interrupted, waiting for supported device to connect and using it. When disconnected it will wait for new connection.

About

use 3D mouse as 2D TrackPoint

Topics

3dconnexionspacemousetrackpointusb-hid

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.