Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ core-foundation-sys = {version = "0.8"}
dispatch = "0.2"


[target.'cfg(target_os = "linux")'.dependencies]
[target.'cfg(all(target_family = "unix", not(target_os = "macos")))'.dependencies]
libc = "0.2"
x11 = {version = "2.18", features = ["xlib", "xrecord", "xinput"], optional = true}
evdev-rs = {version = "0.6", optional=true}
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ use crate::macos::{display_size as _display_size, listen as _listen, simulate as
#[cfg(target_os = "macos")]
pub use crate::macos::{set_is_main_thread, Keyboard};

#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
mod linux;
#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
pub use crate::linux::Keyboard;
#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
use crate::linux::{display_size as _display_size, listen as _listen, simulate as _simulate};

#[cfg(target_os = "windows")]
Expand Down Expand Up @@ -323,7 +323,7 @@ pub fn display_size() -> Result<(u64, u64), DisplayError> {
}

#[cfg(feature = "unstable_grab")]
#[cfg(target_os = "linux")]
#[cfg(all(target_family = "unix", not(target_os = "macos")))]
pub use crate::linux::grab as _grab;
#[cfg(feature = "unstable_grab")]
#[cfg(target_os = "macos")]
Expand Down
3 changes: 3 additions & 0 deletions src/linux/wayland/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ use super::xkb_keycodes::internal_to_xkb_keycode;
use crate::rdev::{EventType, Key, KeyboardState};
use xkbcommon::xkb;

#[allow(dead_code)]
// TODO this does not handle keyboard mapping change
// which is handled by the compositor and depend on window to window
pub struct Keyboard {
context: xkb::Context,
keymap: xkb::Keymap,
Expand Down