Crate rawinput [−] [src]

rawinput library for rust development on windows

Usage Example

extern crate rawinput;
use rawinput::*;
use rawinput::RawEvent::*;
fn main() {
    let mut manager = RawInputManager::new().unwrap();
    manager.register_devices(DeviceType::All);
    'outer: loop{
        if let Some(event) = manager.get_event(){
            match event{
                KeyboardEvent(id,  KeyId::Return, State::Pressed) => println!("Keyboard Number {:?} Pressed Return", id),
                KeyboardEvent(id,  KeyId::Escape, State::Pressed) => break 'outer,
                _ => (),
            }
        }
    }
}

Reexports

pub use event::*;

Modules

event

Structs

Devices

Stores Names to All Raw Input Devices

Hid

Hid Raw Input Name

Keyboard

Keyboard Raw Input Name

Mouse

Mouse Raw Input Name

RawInputManager

Manages Raw Input Processing

Enums

DeviceType

Types of Raw Input Device

Functions

print_raw_device_list

Prints a list of all available raw input devices

produce_raw_device_list

Produces a Device struct containing ID's to all available raw input Devices