-
`,
@@ -524,7 +529,7 @@ export const globalShortcut = () => {
}
/// #endif
- if (matchHotKey(window.siyuan.config.keymap.general.syncNow.custom, event)) {
+ if (!isTabWindow && matchHotKey(window.siyuan.config.keymap.general.syncNow.custom, event)) {
event.preventDefault();
syncGuide(document.querySelector("#barSync"));
return;
@@ -539,12 +544,12 @@ export const globalShortcut = () => {
event.preventDefault();
return;
}
- if (matchHotKey(window.siyuan.config.keymap.general.dataHistory.custom, event)) {
+ if (!isTabWindow && matchHotKey(window.siyuan.config.keymap.general.dataHistory.custom, event)) {
openHistory();
event.preventDefault();
return;
}
- if (!window.siyuan.config.readonly && matchHotKey(window.siyuan.config.keymap.general.config.custom, event)) {
+ if (!isTabWindow && !window.siyuan.config.readonly && matchHotKey(window.siyuan.config.keymap.general.config.custom, event)) {
openSetting();
event.preventDefault();
return;
@@ -580,7 +585,7 @@ export const globalShortcut = () => {
event.preventDefault();
return;
}
- if (matchHotKey(window.siyuan.config.keymap.general.dailyNote.custom, event)) {
+ if (!isTabWindow && matchHotKey(window.siyuan.config.keymap.general.dailyNote.custom, event)) {
newDailyNote();
if (target.classList.contains("protyle-wysiwyg") ||
target.tagName === "TABLE" ||
@@ -736,12 +741,12 @@ export const globalShortcut = () => {
}
// 文件树的操作
- if (fileTreeKeydown(event)) {
+ if (!isTabWindow && fileTreeKeydown(event)) {
return;
}
// 面板的操作
- if (panelTreeKeydown(event)) {
+ if (!isTabWindow && panelTreeKeydown(event)) {
return;
}
@@ -843,8 +848,12 @@ const dialogArrow = (element: HTMLElement, event: KeyboardEvent) => {
currentLiElement.parentElement.firstElementChild.classList.add("b3-list-item--focus");
}
} else if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
- const sideElement = currentLiElement.parentElement.previousElementSibling || currentLiElement.parentElement.nextElementSibling;
- (sideElement.querySelector(`[data-index="${currentLiElement.getAttribute("data-index")}"]`) || sideElement.lastElementChild).classList.add("b3-list-item--focus");
+ if (isWindow()) {
+ currentLiElement.classList.add("b3-list-item--focus");
+ } else {
+ const sideElement = currentLiElement.parentElement.previousElementSibling || currentLiElement.parentElement.nextElementSibling;
+ (sideElement.querySelector(`[data-index="${currentLiElement.getAttribute("data-index")}"]`) || sideElement.lastElementChild).classList.add("b3-list-item--focus");
+ }
} else if (event.key === "Enter") {
const currentType = currentLiElement.getAttribute("data-type") as TDockType;
if (currentType) {
@@ -893,20 +902,23 @@ ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__
`;
});
let dockHtml = "";
- getAllDocks().forEach((item, index) => {
- dockHtml += `
+ if (!isWindow()) {
+ dockHtml = ''
+ getAllDocks().forEach((item, index) => {
+ dockHtml += `-
${window.siyuan.languages[item.hotkeyLangId]}
${updateHotkeyTip(window.siyuan.config.keymap.general[item.hotkeyLangId].custom)}
`;
- });
+ });
+ dockHtml = dockHtml + "
";
+ }
const dialog = new Dialog({
title: window.siyuan.languages.recentDocs,
content: `