Trait tauri::GlobalShortcutManager
source · [−]pub trait GlobalShortcutManager: Debug + Clone + Send + Sync {
fn is_registered(&self, accelerator: &str) -> Result<bool, Error>;
fn register<F>(
&mut self,
accelerator: &str,
handler: F
) -> Result<(), Error>
where
F: 'static + Fn() + Send;
fn unregister_all(&mut self) -> Result<(), Error>;
fn unregister(&mut self, accelerator: &str) -> Result<(), Error>;
}
Available on crate feature
global-shortcut
only.Expand description
A global shortcut manager.
Required Methods
Whether the application has registered the given accelerator
.
Register a global shortcut of accelerator
.
fn unregister_all(&mut self) -> Result<(), Error>
fn unregister_all(&mut self) -> Result<(), Error>
Unregister all accelerators registered by the manager instance.