mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 03:10:16 +01:00
This commit is contained in:
parent
c3bb1fc76f
commit
68b94077c6
2 changed files with 37 additions and 10 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue