Skip to content

Commit

Permalink
Implement Hotkeys for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
CryZe committed Apr 24, 2017
1 parent 9bce63c commit 48e4dcf
Show file tree
Hide file tree
Showing 10 changed files with 2,240 additions and 285 deletions.
7 changes: 7 additions & 0 deletions hotkey/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ keywords = ["speedrun", "timer", "livesplit", "hotkey", "keyboard"]
winapi = "0.2.8"
user32-sys = "0.2.0"
kernel32-sys = "0.2.2"
parking_lot = "0.4.0"

[target.'cfg(target_os = "linux")'.dependencies]
x11-dl = "2.13.0"
mio = "0.6.6"
promising-future = "0.2.4"

[dependencies]
quick-error = "1.1.0"
18 changes: 10 additions & 8 deletions hotkey/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#[macro_use]
extern crate quick_error;

#[cfg(windows)]
pub mod windows;
#[cfg(windows)]
pub use windows::*;

#[cfg(not(any(windows)))]
#[cfg(target_os = "linux")]
pub mod linux;
#[cfg(target_os = "linux")]
pub use linux::*;

#[cfg(not(any(windows, target_os = "linux")))]
pub mod other;
#[cfg(not(any(windows)))]
#[cfg(not(any(windows, target_os = "linux")))]
pub use other::*;

#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum KeyEvent {
KeyUp(KeyCode),
KeyDown(KeyCode),
}
Loading

0 comments on commit 48e4dcf

Please sign in to comment.