#keyboard-input #linux #keyboard-events #raw #input-event #systems #reading

linux_raw_input_rs

Simple library to grab raw input from keyboard in linux systems

6 releases

Uses old Rust 2015

0.1.6 Nov 25, 2018
0.1.5 Jun 16, 2017
0.1.3 May 31, 2017

#1056 in Hardware support

MIT license

28KB
815 lines

linux_raw_input_rs

Simple library for reading keyboard input directly from input events in linux systems.

linux_raw_input_rs = "0.1.6"

Example of code using it:

let device_path : String = get_input_devices().iter().nth(0).expect("Problem with iterator").to_string();
    let mut reader = InputReader::new(device_path);
    loop {
        let input = reader.current_state();
        if input.is_key_event(){
            println!("Key {:?} now has state {:?}", input.get_key(), input.event_type());
        }
    }

Root access is required for program to run

Dependencies

~0.4–1MB
~23K SLoC