#key-press #macos #finding #pressed #key-code

readkey

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

10 releases

Uses old Rust 2015

0.2.2 Mar 4, 2025
0.2.1 Dec 29, 2019
0.1.7 Dec 28, 2019
0.1.5 Oct 19, 2018

#25 in macOS and iOS APIs

Download history 1335/week @ 2025-05-24 988/week @ 2025-05-31 1555/week @ 2025-06-07 1410/week @ 2025-06-14 2118/week @ 2025-06-21 1449/week @ 2025-06-28 1423/week @ 2025-07-05 2639/week @ 2025-07-12 6430/week @ 2025-07-19 3931/week @ 2025-07-26 2140/week @ 2025-08-02 1943/week @ 2025-08-09 1856/week @ 2025-08-16 1683/week @ 2025-08-23 2040/week @ 2025-08-30 1626/week @ 2025-09-06

7,489 downloads per month
Used in 45 crates (3 directly)

MIT license

8KB
163 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