global_hotkey lets you register Global HotKeys for Desktop Applications.
Example
use ;
// initialize the hotkeys manager
let manager = new.unwrap;
// construct the hotkey
let hotkey = new;
// register it
manager.register;
Processing global hotkey events
You can also listen for the menu events using GlobalHotKeyEvent::receiver to get events for the hotkey pressed events.
use GlobalHotKeyEvent;
if let Ok = receiver.try_recv
Platforms-supported:
- Windows
- macOS
- Linux (X11 Only)
License
Apache-2.0/MIT