spacemouse 0.1.0

Cross-platform HID Driver for 3Dconnexion SpaceMouse Devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Prints the events of a connected SpaceMouse until Enter is pressed.
//!
//! Uses `SpaceMouseThread`, which scans for the device on a background thread
//! and reconnects automatically.

use spacemouse::SpaceMouseThread;
use std::io;

fn main() {
  let _spacemouse = SpaceMouseThread::new(|event| println!("{event:?}"));
  println!("Listening for SpaceMouse events. Press Enter to quit.");
  let _ = io::stdin().read_line(&mut String::new());
}