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

readkey

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

10 releases

Uses old Rust 2015

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

#23 in macOS and iOS APIs

Download history 622/week @ 2024-11-15 987/week @ 2024-11-22 819/week @ 2024-11-29 976/week @ 2024-12-06 1299/week @ 2024-12-13 687/week @ 2024-12-20 448/week @ 2024-12-27 850/week @ 2025-01-03 1355/week @ 2025-01-10 1198/week @ 2025-01-17 955/week @ 2025-01-24 1013/week @ 2025-01-31 1442/week @ 2025-02-07 1236/week @ 2025-02-14 1744/week @ 2025-02-21 1096/week @ 2025-02-28

5,729 downloads per month
Used in 36 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