claves

Crates.ioclaves
lib.rsclaves
version0.2.0
sourcesrc
created_at2022-09-23 02:20:47.900212
updated_at2023-09-16 12:46:11.281991
descriptionA library for capturing Keystrokes and Mouse clicks on Linux, MacOS and Windows.
homepagehttps://github.com/Selyatin/claves
repositoryhttps://github.com/Selyatin/claves
max_upload_size
id672082
size44,309
(Selyatin)

documentation

README

Claves - A library for capturing global Keystrokes and Mouse clicks on MacOS and Windows

use claves::{init, deinit};

fn main(){
  // Global channel, you can initiate a receiver from multiple threads and all of them will receive the events.
  let receiver = init();
  
  dbg!(receiver.recv().unwrap());
  
  // Deinitializes all threads that capture data from the keyboard and mouse, then empties out the global channel.
  deinit();
}

  • MacOS (Uses Core Graphics API to intercept Session Events and Carbon API to translate Virtual Keycodes into Unicode Characters). Requires Accessibility permissions, check the MacOS Example.
  • Windows (Uses Windows Hooks API to intercept Events and the Winuser API to translate Virtual Keycodes into Unicode Characters).
  • Linux. Not planned for now.
Commit count: 25

cargo fmt