Vanessa 2025-04-14 13:31:04 +08:00
parent c3bb1fc76f
commit 68b94077c6
2 changed files with 37 additions and 10 deletions

View file

@ -1734,3 +1734,23 @@ export const sendGlobalShortcut = (app: App) => {
});
/// #endif
};
export const sendUnregisterGlobalShortcut = (app:App) => {
/// #if !BROWSER
ipcRenderer.send(Constants.SIYUAN_CMD, {
cmd: "unregisterGlobalShortcut",
accelerator: window.siyuan.config.keymap.general.toggleWin.custom
});
app.plugins.forEach(plugin => {
plugin.commands.forEach(command => {
if (command.globalCallback) {
ipcRenderer.send(Constants.SIYUAN_CMD, {
cmd: "unregisterGlobalShortcut",
accelerator: command.customHotkey
});
}
});
});
/// #endif
}