https://github.com/brianpeiris/spacepad
A simple python script that turns a spacemouse device into a standard gamepad
https://github.com/brianpeiris/spacepad
Last synced: 19 days ago
JSON representation
A simple python script that turns a spacemouse device into a standard gamepad
- Host: GitHub
- URL: https://github.com/brianpeiris/spacepad
- Owner: brianpeiris
- License: mit
- Created: 2022-06-19T01:16:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-27T10:38:15.000Z (almost 4 years ago)
- Last Synced: 2026-01-18T22:34:06.490Z (5 months ago)
- Language: Python
- Size: 81.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-hidapi.txt
Awesome Lists containing this project
README
# spacepad
A simple python script that turns a 3Dconnexion SpaceMouse device into a standard Xbox-style gamepad device, using pyspacemouse and vgamepad. This allows the SpaceMouse to be used in browsers via the Gamepad API.
You do not need to install 3Dconnexion's software or drivers to use this script.
This repo also includes hidapi.dll for Windows, from [libusb](https://github.com/libusb/hidapi), under the BSD license detailed in LICENSE-hidapi.md.
# usage
```bash
pip install -r requirements.txt
python main.py
```
# mapping
The mapping used is a bit quirky, since it was designed to be used with a fork of the [Figma SpaceMouse plugin](https://github.com/brianpeiris/figma-plugin-spacemouse).
| gamepad | spacemouse |
| - | - |
| left thumbstick x | x |
| left thumbstick y | y |
| right thumbstick x | roll |
| right thumbstick y | z |
| left trigger | pitch |
| right trigger | yaw |