This is an .NET driver for the 3dconnexion SpaceMouse using Usb.Net and Hid.Net from Device.Net. Compatible with netstandard2.0 of higher.
A few examples of useful commands and/or tasks.
// Get the first connected SpaceMousevarmouseInfo=SpaceMouse.GetConnectedMice().Result.First();// Create a SpaceMouse instancevarmouse=newSpaceMouse(mouseInfo);// Subscribe to the eventsmouse.TranslationEvent+=Mouse_TranslationEvent;mouse.RotationEvent+=Mouse_RotationEvent;mouse.ButtonEvent+=Mouse_ButtonEvent;voidMouse_ButtonEvent(SpaceMousearg1,bool[]arg2){Console.WriteLine($"B {String.Join("",arg2.Select(b =>b?"1":"0"))}");}voidMouse_RotationEvent(SpaceMousearg1,System.Numerics.Vector3arg2){Console.WriteLine($"R {arg2.X}{arg2.Y}{arg2.Z}");}voidMouse_TranslationEvent(SpaceMousearg1,System.Numerics.Vector3arg2){Console.WriteLine($"T {arg2.X}{arg2.Y}{arg2.Z}");}// Start listening for eventsmouse.Start();This project is licensed under the MIT License - see the LICENSE file for details.