Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
opt: handle grab exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Asura committed Dec 11, 2022
1 parent 4051761 commit 3d6d413
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 166 deletions.
5 changes: 4 additions & 1 deletion examples/grab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ fn main() {
let delay = Duration::from_secs(5);

println!("[*] starting grab listen...");
start_grab_listen(callback);
if let Err(err) = start_grab_listen(callback){
eprintln!("start grab listen error: {:?}", err);
return;
};

println!("[*] grab keys(5s), try to press Ctrl+C, won't work on other applications");
enable_grab();
Expand Down
Loading

0 comments on commit 3d6d413

Please sign in to comment.