Trait tauri_runtime::GlobalShortcutManager[][src]

pub trait GlobalShortcutManager {
    fn is_registered(&self, accelerator: &str) -> Result<bool>;
fn register<F: Fn() + Send + 'static>(
        &mut self,
        accelerator: &str,
        handler: F
    ) -> Result<()>;
fn unregister_all(&mut self) -> Result<()>;
fn unregister(&mut self, accelerator: &str) -> Result<()>; }
Expand description

A global shortcut manager.

Required methods

Whether the application has registered the given accelerator.

Panics

Panics if the app is not running yet, usually when called on the tauri::Builder#setup closure. You can spawn a task to use the API using the tauri::async_runtime to prevent the panic.

Register a global shortcut of accelerator.

Panics

Panics if the app is not running yet, usually when called on the tauri::Builder#setup closure. You can spawn a task to use the API using the tauri::async_runtime to prevent the panic.

Unregister all accelerators registered by the manager instance.

Panics

Panics if the app is not running yet, usually when called on the tauri::Builder#setup closure. You can spawn a task to use the API using the tauri::async_runtime to prevent the panic.

Unregister the provided accelerator.

Panics

Panics if the app is not running yet, usually when called on the tauri::Builder#setup closure. You can spawn a task to use the API using the tauri::async_runtime to prevent the panic.

Implementors