//! Validation helper: exits after both native global actions arrive. use std::{sync::mpsc, time::Duration}; fn main() { let (sender, receiver) = mpsc::channel(); let _hotkeys = clipbin_core::hotkeys::start( 9, 10, move |action, _| { sender.send(action).unwrap(); }, |status| println!("hotkeys={status}"), ); let first = receiver .recv_timeout(Duration::from_secs(20)) .expect("first action"); let second = receiver .recv_timeout(Duration::from_secs(20)) .expect("second action"); assert!(matches!( (first, second), ( clipbin_core::hotkeys::Action::Clip, clipbin_core::hotkeys::Action::Bookmark ) )); println!("PASS native clip and bookmark hotkeys"); }