#daemon #3d #source #mouse #open #interface

spacenav

Library for interfacing with the open source Spacenav daemon

1 unstable release

Uses old Rust 2015

0.1.0 Jul 22, 2016

#99 in #mouse

MIT license

5KB
62 lines

This crate provides an interface to the open source Spacenav daemon.

This daemon communicates with 3D mice made by 3DConnexion such as the SpaceNavigator.

The spacenavd daemon supports two protocols. An X11 protocol compatible with the proprietary daemon as well as an alternative communication protocol that does not require an X server. This crate communicates via the second, non X11 protocol. For now the X11 protocol is not implemented.

Installation

[dependencies]
spacenav = "*"

Example

extern crate spacenav;

use spacenav::SpaceNav;

fn main() {

    let mut spcnav = SpaceNav::new().unwrap();

    loop {
        let event = spcnav.read();

        println!("{:?}", event);
    }
}

lib.rs:

This crate provides an interface to the open source Spacenav daemon.

This daemon communicates with 3D mice made by 3DConnexion such as the SpaceNavigator.

The spacenavd daemon supports two protocols. An X11 protocol compatible with the proprietary daemon as well as an alternative communication protocol that does not require an X server. This crate commmunicates via the second, non X protocol. For now the X11 protocol is not implemented.

Examples

extern crate spacenav;

use spacenav::SpaceNav;

fn main() {

    let mut spcnav = SpaceNav::new().unwrap();

    loop {
        let event = spcnav.read();

        println!("{:?}", event);
    }
}

Dependencies

~165KB