4 releases

Uses old Rust 2015

0.1.3 Jan 29, 2018
0.1.2 Apr 30, 2016
0.1.1 Apr 25, 2016
0.1.0 Apr 25, 2016

#1332 in Hardware support

Download history 659/week @ 2024-03-13 799/week @ 2024-03-20 942/week @ 2024-03-27 525/week @ 2024-04-03 684/week @ 2024-04-10 772/week @ 2024-04-17 970/week @ 2024-04-24 547/week @ 2024-05-01 846/week @ 2024-05-08 760/week @ 2024-05-15 680/week @ 2024-05-22 437/week @ 2024-05-29 709/week @ 2024-06-05 745/week @ 2024-06-12 809/week @ 2024-06-19 444/week @ 2024-06-26

2,806 downloads per month
Used in 14 crates (5 directly)

WTFPL license

57KB
2.5K SLoC

uinput

/dev/uinput high level wrapper.

Example

The following example writes hello world.

extern crate uinput;
use uinput::event::keyboard;

use std::thread;
use std::time::Duration;

fn main() {
	let mut device = uinput::default().unwrap()
		.name("test").unwrap()
		.event(uinput::event::Keyboard::All).unwrap()
		.create().unwrap();

	thread::sleep(Duration::from_secs(1));

	device.click(&keyboard::Key::H).unwrap();
	device.click(&keyboard::Key::E).unwrap();
	device.click(&keyboard::Key::L).unwrap();
	device.click(&keyboard::Key::L).unwrap();
	device.click(&keyboard::Key::O).unwrap();
	device.click(&keyboard::Key::Space).unwrap();
	device.click(&keyboard::Key::W).unwrap();
	device.click(&keyboard::Key::O).unwrap();
	device.click(&keyboard::Key::R).unwrap();
	device.click(&keyboard::Key::L).unwrap();
	device.click(&keyboard::Key::D).unwrap();
	device.click(&keyboard::Key::Enter).unwrap();

	device.synchronize().unwrap();
}

Dependencies

~2MB
~43K SLoC