Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpaceMouse Compact support #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Mqrius
Copy link

@Mqrius Mqrius commented Mar 19, 2025

Added complete SpaceMouse Compact support, including rotational axes and buttons.
Vendor ID: 9583
Product ID: 50741

On the way, I made the script run on use AHKHID's VID/PID functions rather than dll calls in _getRAWdevices. On Windows 10 it didn't seem to be able to read the HID devices properly, though AHKHID had no problems with it.

Also made the watchdog only run when compiled, so that the script can be tested without errors as an AHK file.

Closes #4, closes #9

I don't have a SpaceMouse Enterprise myself but if that one has the same issue with the rotational axes, send me a message and I can probably fix it without too much issue.

This PR does not include firereverie's PR for SpaceMouse Pro Wireless (50737) Button Support, and to merge them you'll have to increment the array length to 11 where it currently says Dim $aDeviceButtons[10][4] in both of our PRs. The rest should be straightforward.

Tested with the current versions of VJoy (2.1.9.1) and 3DxWare (v10.9.3 b671) on Windows 10

Mqrius added 6 commits March 19, 2025 16:49
Replace the old raw HID detection method with AHKHID library functions. The old way didn't seem to work on windows 10 anymore, and AHKHID, even though it's over a decade old, still performs fine. We're using AHKHID anyway, might as well use the functions it provides.
Add button detection and config for SpaceMouse Compact
SpaceMouse Compact sends a different HID message for the rotational
and the translational axes, identical to how VendorID 1133 does it.
Handling SpaceMouse Compact in its own code correctly reads both
rotational and translational movement.
When running as plain AHK file, the watchdog can't properly shut itself
down on exit. It's not all that important so just don't run it during
debugging, only run it when executing an exe file.
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.

Rotational axis for SpaceMouse Compact Unable to get Rotational Axis SpaceMouse Compact
1 participant