hookmap/
lib.rs

1//! Registers hotkeys and simulates keyboard and mouse input.
2//!
3//! # Feature flags
4//!
5//! * `us-keyboard-layout` (default): Use US keyboard layout. This changes the [`Button`] variant.
6//! * `japanese-keyboard-layout`: Use Japanese keyboard layout. This changes the [`Button`] variant.
7//!
8//! [`Button`]: crate::device::Button
9
10pub mod hotkey;
11pub mod utils;
12
13#[doc(hidden)]
14pub mod macros;
15
16mod hook;
17mod runtime;
18
19pub use runtime::interceptor;
20
21/// Representation of keyboard and mouse events.
22pub mod device {
23    pub use hookmap_core::button::{Button, ButtonAction, ButtonKind};
24    pub use hookmap_core::event::{ButtonEvent, CursorEvent, NativeEventOperation, WheelEvent};
25    pub use hookmap_core::mouse;
26}
27
28/// A prelude for conveniently defining hotkeys.
29pub mod prelude {
30    // Macros
31    pub use super::{buttons, hotkey, seq};
32
33    pub use super::{
34        device::*,
35        hotkey::{Context, Hotkey},
36        interceptor::{Filter, Interceptor},
37        utils,
38    };
39}