Expand description
lock_keys
provides a cross platform way for lock keys handling.
Supported platforms: Linux (Xlib static), Windows (winuser API) and macOS (IOKit).
§Example
The example below shows how to toggle the state of the Capital Lock key:
use lock_keys::*;
fn main() {
let lock_key = LockKey::new();
lock_key.enable(LockKeys::CapitalLock).unwrap();
}
Structs§
- LockKey
- The lock ley object to hold the OS specific handle when it is required.
Enums§
- Lock
KeyState - Lock
Keys - The available lock keys for handling, i.e. Capital Lock, Number Lock and Scrolling Lock.
Traits§
- Lock
KeyWrapper - A collection of methods that are required for lock key handling.
Type Aliases§
- Lock
KeyResult - A specialized
Result
type lock key handling.