mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
ddac5ff625
commit
e7a1902d60
2 changed files with 8 additions and 4 deletions
|
|
@ -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.send(Constants.SIYUAN_EVENT);
|
||||||
ipcRenderer.on(Constants.SIYUAN_EVENT, (event, cmd) => {
|
ipcRenderer.on(Constants.SIYUAN_EVENT, (event, cmd) => {
|
||||||
if (cmd === "focus") {
|
if (cmd === "focus") {
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,10 @@ export const keymap = {
|
||||||
fetchPost("/api/setting/setKeymap", {
|
fetchPost("/api/setting/setKeymap", {
|
||||||
data
|
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) {
|
if (oldToggleWin !== window.siyuan.config.keymap.general.toggleWin.custom) {
|
||||||
ipcRenderer.send(Constants.SIYUAN_CMD, {
|
ipcRenderer.send(Constants.SIYUAN_CMD, {
|
||||||
cmd: "unregisterGlobalShortcut",
|
cmd: "unregisterGlobalShortcut",
|
||||||
|
|
@ -333,6 +337,10 @@ export const keymap = {
|
||||||
fetchPost("/api/setting/setKeymap", {
|
fetchPost("/api/setting/setKeymap", {
|
||||||
data: Constants.SIYUAN_KEYMAP,
|
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) {
|
if (window.siyuan.config.keymap.general.toggleWin.default !== window.siyuan.config.keymap.general.toggleWin.custom) {
|
||||||
ipcRenderer.send(Constants.SIYUAN_CMD, {
|
ipcRenderer.send(Constants.SIYUAN_CMD, {
|
||||||
cmd: "unregisterGlobalShortcut",
|
cmd: "unregisterGlobalShortcut",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue