#key-pressed #macos #key-code #finding #up

readkey

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

9 releases

Uses old Rust 2015

0.2.1 Dec 29, 2019
0.1.7 Dec 28, 2019
0.1.5 Oct 19, 2018

#60 in macOS and iOS APIs

Download history 612/week @ 2024-07-21 670/week @ 2024-07-28 612/week @ 2024-08-04 677/week @ 2024-08-11 613/week @ 2024-08-18 869/week @ 2024-08-25 1152/week @ 2024-09-01 966/week @ 2024-09-08 1003/week @ 2024-09-15 1249/week @ 2024-09-22 1068/week @ 2024-09-29 790/week @ 2024-10-06 819/week @ 2024-10-13 1139/week @ 2024-10-20 929/week @ 2024-10-27 909/week @ 2024-11-03

3,837 downloads per month
Used in 35 crates (3 directly)

MIT license

7KB
142 lines

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.

No runtime deps