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

#1359 in Hardware support

Download history 816/week @ 2024-07-21 589/week @ 2024-07-28 458/week @ 2024-08-04 828/week @ 2024-08-11 562/week @ 2024-08-18 529/week @ 2024-08-25 820/week @ 2024-09-01 906/week @ 2024-09-08 702/week @ 2024-09-15 1135/week @ 2024-09-22 401/week @ 2024-09-29 453/week @ 2024-10-06 480/week @ 2024-10-13 471/week @ 2024-10-20 787/week @ 2024-10-27 323/week @ 2024-11-03

2,081 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
~44K SLoC