More edition 2018 cleanup
This commit is contained in:
parent
f4083343da
commit
c2efbb6fd1
@ -4,7 +4,7 @@ use std::ffi::CString;
|
|||||||
use libc::c_int;
|
use libc::c_int;
|
||||||
use nix::{self, fcntl, unistd, errno::Errno};
|
use nix::{self, fcntl, unistd, errno::Errno};
|
||||||
use nix::sys::stat;
|
use nix::sys::stat;
|
||||||
use ffi::*;
|
use uinput_sys::*;
|
||||||
use crate::{Result as Res, Device};
|
use crate::{Result as Res, Device};
|
||||||
use std::collections::hash_map::Values;
|
use std::collections::hash_map::Values;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use std::{mem, ptr, slice};
|
use std::{mem, ptr, slice};
|
||||||
use libc::{timeval, gettimeofday, input_event, c_int};
|
use libc::{timeval, gettimeofday, input_event, c_int};
|
||||||
use nix::{unistd, errno::Errno};
|
use nix::{unistd, errno::Errno};
|
||||||
use ffi::*;
|
use uinput_sys::*;
|
||||||
use crate::{Result as Res};
|
use crate::{Result as Res};
|
||||||
|
|
||||||
/// The virtual device.
|
/// The virtual device.
|
||||||
|
@ -3,6 +3,7 @@ use std::fs::File;
|
|||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use std::os::unix::io::AsRawFd;
|
use std::os::unix::io::AsRawFd;
|
||||||
use libc::{input_event, c_int};
|
use libc::{input_event, c_int};
|
||||||
|
use nix::ioctl_write_ptr;
|
||||||
use crate::{Error,Result};
|
use crate::{Error,Result};
|
||||||
|
|
||||||
ioctl_write_ptr!(eviocgrab, b'E', 0x90, c_int);
|
ioctl_write_ptr!(eviocgrab, b'E', 0x90, c_int);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
use crate::Device;
|
use crate::Device;
|
||||||
|
|
||||||
use ffi::*;
|
use uinput_sys::*;
|
||||||
use libc::{c_int, input_event};
|
use libc::{c_int, input_event};
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
@ -399,9 +399,8 @@ impl KeyMapper for Key {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern crate toml;
|
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use serde_derive::Deserialize;
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
pub struct KeymapConfig {
|
pub struct KeymapConfig {
|
||||||
|
12
src/lib.rs
12
src/lib.rs
@ -1,18 +1,8 @@
|
|||||||
#![recursion_limit = "1000"]
|
#![recursion_limit = "1000"]
|
||||||
|
|
||||||
extern crate libc;
|
|
||||||
|
|
||||||
extern crate uinput_sys as ffi;
|
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate nix;
|
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate serde_derive;
|
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
mod error;
|
pub mod error;
|
||||||
pub use error::Error;
|
pub use error::Error;
|
||||||
|
|
||||||
pub type Result<T> = ::std::result::Result<T, Error>;
|
pub type Result<T> = ::std::result::Result<T, Error>;
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
extern crate rusty_keys;
|
|
||||||
extern crate uinput_sys as ffi;
|
|
||||||
extern crate libc;
|
|
||||||
extern crate getopts;
|
|
||||||
extern crate inotify;
|
|
||||||
|
|
||||||
use rusty_keys::{KeyMaps, Device, InputDevice, Result};
|
use rusty_keys::{KeyMaps, Device, InputDevice, Result};
|
||||||
|
|
||||||
use ffi::*;
|
use uinput_sys::*;
|
||||||
use libc::input_event;
|
use libc::input_event;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::{env, thread};
|
use std::{env, thread};
|
||||||
|
Loading…
Reference in New Issue
Block a user