readkey

Crates.ioreadkey
lib.rsreadkey
version0.2.1
sourcesrc
created_at2018-10-18 19:32:51.496666
updated_at2019-12-29 16:42:11.593227
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
size7,774
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