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

The lock ley object to hold the OS specific handle when it is required.

Enums

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

Traits

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

Type Definitions

A specialized Result type lock key handling.