Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SharpSpaceMouse

This is an .NET driver for the 3dconnexion SpaceMouse using Usb.Net and Hid.Net from Device.Net. Compatible with netstandard2.0 of higher.

Usage

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();

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Cross platform 3Dconnexion HID driver

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages