|
|
@ -64,7 +64,7 @@ fn main() {
|
|
|
|
tauri_plugin_global_shortcut::Builder::new()
|
|
|
|
tauri_plugin_global_shortcut::Builder::new()
|
|
|
|
.with_shortcuts(["ctrl+d", "alt+space"])?
|
|
|
|
.with_shortcuts(["ctrl+d", "alt+space"])?
|
|
|
|
.with_handler(|app, shortcut, event| {
|
|
|
|
.with_handler(|app, shortcut, event| {
|
|
|
|
if event.state == ShortcutState::Preseed {
|
|
|
|
if event.state == ShortcutState::Pressed {
|
|
|
|
if shortcut.matches(Modifiers::CONTROL, Code::KeyD) {
|
|
|
|
if shortcut.matches(Modifiers::CONTROL, Code::KeyD) {
|
|
|
|
let _ = app.emit("shortcut-event", "Ctrl+D triggered");
|
|
|
|
let _ = app.emit("shortcut-event", "Ctrl+D triggered");
|
|
|
|
}
|
|
|
|
}
|
|
|
|