1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Linux evdev implementation.
//!
//! This implementation uses evdev to read input events directly from
//! `/dev/input/event*` devices. This works on both X11 and Wayland.
//!
//! ## Permissions
//!
//! To access input devices, the process must either:
//! - Run as root (not recommended)
//! - Run as a user in the `input` group (recommended)
//!
//! To add yourself to the input group:
//! ```bash
//! sudo usermod -aG input $USER
//! # Then log out and back in
//! ```
//!
//! ## Wayland Grab Limitation
//!
//! On **Wayland**, `run_grab_hook` (grab mode) has a known limitation:
//!
//! - ✅ Events you **consume** (return `None` from handler) are properly blocked
//! - ❌ Events you **pass through** (return `Some(event)`) may not reach applications
//!
//! This happens because Wayland compositors use libinput which ignores events
//! from virtual devices (uinput) for security. When we grab the physical devices
//! via evdev, libinput loses access to them, and our re-injected events are
//! not recognized by the compositor.
//!
//! For selective event filtering on Wayland, consider using your compositor's
//! native hotkey/configuration system instead of this library.
pub use ;
pub use ;
pub use ;