Crate lock_keys

Source
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§

LockKeyState
LockKeys
The available lock keys for handling, i.e. Capital Lock, Number Lock and Scrolling Lock.

Traits§

LockKeyWrapper
A collection of methods that are required for lock key handling.

Type Aliases§

LockKeyResult
A specialized Result type lock key handling.