| Crates.io | joydev-rs |
| lib.rs | joydev-rs |
| version | 0.2.0 |
| created_at | 2019-10-17 18:33:05.113464+00 |
| updated_at | 2019-12-08 01:27:45.695164+00 |
| description | Rust joydev library. |
| homepage | |
| repository | https://gitlab.com/gm666q/joydev-rs |
| max_upload_size | |
| id | 173427 |
| size | 92,811 |
A Rust wrapper library for joydev devices
Add this to your Cargo.tml:
[dependencies]
joydev-rs = "^0.1.0"
and this to your crate root:
extern crate joydev_rs;
to get started open a device:
use joydev_rs::Device;
fn main() {
// You should probably check what devices are available
// by reading /dev/input directory or using udev.
if let Ok(device) = Device::open("/dev/input/js0") {
// Get an event and print it.
println!("{:?}", device.get_event());
}
}
or run the example:
cargo run --example=device