evdev 0.13.2

evdev interface for Linux
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Demonstrating how to monitor events with evdev + tokio

// cli/"tui" shared between the evtest examples
mod _pick_device;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let d = _pick_device::pick_device();
    println!("{}", d);
    println!("Events:");
    let mut events = d.into_event_stream()?;
    loop {
        let ev = events.next_event().await?;
        println!("{:?}", ev);
    }
}