This commit is contained in:
Vanessa 2024-04-28 11:47:34 +08:00
parent ddac5ff625
commit e7a1902d60
2 changed files with 8 additions and 4 deletions

View file

@ -221,10 +221,6 @@ export const initWindow = async (app: App) => {
});
};
if (window.siyuan.config.system.autoLaunch2 === 2) {
ipcRenderer.send(Constants.SIYUAN_CMD, "minimize");
}
ipcRenderer.send(Constants.SIYUAN_EVENT);
ipcRenderer.on(Constants.SIYUAN_EVENT, (event, cmd) => {
if (cmd === "focus") {

View file

@ -212,6 +212,10 @@ export const keymap = {
fetchPost("/api/setting/setKeymap", {
data
}, () => {
ipcRenderer.send(Constants.SIYUAN_CMD, {
cmd: "writeLog",
msg: "user update keymap:" + JSON.stringify(window.siyuan.config.keymap)
});
if (oldToggleWin !== window.siyuan.config.keymap.general.toggleWin.custom) {
ipcRenderer.send(Constants.SIYUAN_CMD, {
cmd: "unregisterGlobalShortcut",
@ -333,6 +337,10 @@ export const keymap = {
fetchPost("/api/setting/setKeymap", {
data: Constants.SIYUAN_KEYMAP,
}, () => {
ipcRenderer.send(Constants.SIYUAN_CMD, {
cmd: "writeLog",
msg: "user reset keymap"
});
if (window.siyuan.config.keymap.general.toggleWin.default !== window.siyuan.config.keymap.general.toggleWin.custom) {
ipcRenderer.send(Constants.SIYUAN_CMD, {
cmd: "unregisterGlobalShortcut",