Module tauri_wasm::plugin::global_shortcut
source · Expand description
§Global Shortcut bindings
Register global shortcuts.
§Differences to the JavaScript API
§registerAll
let shortcuts = ["CommandOrControl+Shift+C", "Ctrl+Alt+F12"];
let streams = futures::future::try_join_all(shortcuts.map(|s| async move {
let stream = global_shortcut::register(s).await?;
anyhow::Ok(stream.map(move |_| s))
}))
.await?;
let mut events = futures::stream::select_all(streams);
while let Some(shortcut) = events.next().await {
log::debug!("Shortcut {} triggered", shortcut)
}
Functions§
- Determines whether the given shortcut is registered by this application or not.
- Register a global shortcut.