readkey

Crates.ioreadkey
lib.rsreadkey
version
sourcesrc
created_at2018-10-18 19:32:51.496666+00
updated_at2025-03-04 09:37:47.574717+00
descriptionA very small library for finding out if a key is currently pressed on macOS.
homepagehttps://github.com/segeljakt/readkey
repositoryhttps://github.com/segeljakt/readkey
max_upload_size
id91395
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Klas Segeljakt (segeljakt)

documentation

README

readkey

A very small library for finding out if a key is currently pressed on macOS.

Example usage

Check if the Up key is currently pressed:

use readkey::Keycode;

fn main() {
  loop {
    println!("State of Up key: {}", Keycode::Up.is_pressed());
  }
}

Related

readmouse - Read the mouse location on macOS.

Commit count: 4

cargo fmt