Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14764

Vanessa6a00e3215f46
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
index 722454e3ce..bc273a7a35 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
@@ -7,7 +7,7 @@
"id": "20200924100950-9op5xi1",
"title": "Shortcuts",
"type": "doc",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3754,7 +3754,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20210106154056-koo4wdj",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3773,7 +3773,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20210106154319-v9tt3e2",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3793,7 +3793,7 @@
"Properties": {
"colgroup": "||",
"id": "20240112150534-wiik5sl",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -6341,8 +6341,6 @@
}
]
},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "Select text from the cursor to the beginning of the loaded content"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "No default shortcut; customizable"}]}]},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "Select text from the cursor to the end of the loaded content"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "No default shortcut; customizable"}]}]},
{
"Type": "NodeTableRow",
"Data": "tr",
@@ -6353,7 +6351,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select content blocks from the current block to the beginning of the loaded content"
+ "Data": "Select text from the cursor to the beginning of the loaded content"
}
]
},
@@ -6419,7 +6417,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "Select content blocks from the current block to the end of the loaded content"
+ "Data": "Select text from the cursor to the end of the loaded content"
}
]
},
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
index b8d2ab25e2..42a527d81f 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
@@ -7,7 +7,7 @@
"id": "20200813004551-gm0pbn1",
"title": "快捷键",
"type": "doc",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3752,7 +3752,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20201227133317-rkh4bji",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3767,7 +3767,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20201227133317-kazyttz",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3791,7 +3791,7 @@
"Properties": {
"colgroup": "||",
"id": "20201227133317-vopotjc",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -6293,8 +6293,6 @@
}
]
},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "选中光标至已加载内容首部的文本"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "无默认快捷键,可自定义"}]}]},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "选中光标至已加载内容尾部的文本"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "无默认快捷键,可自定义"}]}]},
{
"Type": "NodeTableRow",
"Data": "tr",
@@ -6305,7 +6303,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中当前块至已加载内容首部的内容块"
+ "Data": "选中光标至已加载内容首部的文本"
}
]
},
@@ -6371,7 +6369,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "选中当前块至已加载内容尾部的内容块"
+ "Data": "选中光标至已加载内容尾部的文本"
}
]
},
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
index 72c9e0b7ac..f2ef1ad1b4 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
@@ -7,7 +7,7 @@
"id": "20211226122549-jktxego",
"title": "快捷鍵",
"type": "doc",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3746,7 +3746,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20211226122652-htptsmh",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3761,7 +3761,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20211226122652-xp1hi60",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3781,7 +3781,7 @@
"Properties": {
"colgroup": "||",
"id": "20240112151141-ggglv0f",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -6306,8 +6306,6 @@
}
]
},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "選取游標至已載入內容首部的文字"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "無預設快速鍵,可自訂"}]}]},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "選取游標至已載入內容尾部的文字"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "無預設快速鍵,可自訂"}]}]},
{
"Type": "NodeTableRow",
"Data": "tr",
@@ -6318,7 +6316,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取目前區塊至已載入內容首部的內容區塊"
+ "Data": "選取游標至已載入內容首部的文字"
}
]
},
@@ -6384,7 +6382,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "選取目前區塊至已載入內容尾部的內容區塊"
+ "Data": "選取游標至已載入內容尾部的文字"
}
]
},
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
index a94cd4a0ea..e7a1ea9cab 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
@@ -9,7 +9,7 @@
"id": "20240530101000-xsbxokr",
"title": "ショートカット",
"type": "doc",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3702,7 +3702,7 @@
"Properties": {
"ID": "20240530101000-twmuxke",
"id": "20240530101000-675gu9g",
- "updated": "20260808211451"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3728,7 +3728,7 @@
"Properties": {
"ID": "20240530101000-tkbdrth",
"id": "20240530101000-9wkmh8w",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -3748,7 +3748,7 @@
"Properties": {
"colgroup": "||",
"id": "20240530101000-1isfzez",
- "updated": "20260808195552"
+ "updated": "20260809003223"
},
"Children": [
{
@@ -6305,8 +6305,6 @@
}
]
},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "カーソルから読み込み済みコンテンツの先頭までのテキストを選択"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "デフォルトのショートカットなし、カスタマイズ可能"}]}]},
- {"Type": "NodeTableRow", "Data": "tr", "Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "カーソルから読み込み済みコンテンツの末尾までのテキストを選択"}]}, {"Type": "NodeTableCell", "Data": "td"}, {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "デフォルトのショートカットなし、カスタマイズ可能"}]}]},
{
"Type": "NodeTableRow",
"Data": "tr",
@@ -6317,7 +6315,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "現在のブロックから読み込み済みコンテンツの先頭までのコンテンツブロックを選択"
+ "Data": "カーソルから読み込み済みコンテンツの先頭までのテキストを選択"
}
]
},
@@ -6383,7 +6381,7 @@
"Children": [
{
"Type": "NodeText",
- "Data": "現在のブロックから読み込み済みコンテンツの末尾までのコンテンツブロックを選択"
+ "Data": "カーソルから読み込み済みコンテンツの末尾までのテキストを選択"
}
]
},
diff --git a/app/src/boot/globalEvent/commonHotkey.ts b/app/src/boot/globalEvent/commonHotkey.ts
index 5e72a6bc45..81aa5fb9fb 100644
--- a/app/src/boot/globalEvent/commonHotkey.ts
+++ b/app/src/boot/globalEvent/commonHotkey.ts
@@ -103,6 +103,10 @@ export const correctHotkey = (app: App) => {
Constants.SIYUAN_KEYMAP.general[key].default.replace("⌃", "⌥");
});
Constants.SIYUAN_KEYMAP.editor.general.redo.custom = Constants.SIYUAN_KEYMAP.editor.general.redo.default = "⌘Y";
+ Constants.SIYUAN_KEYMAP.editor.general.selectToPageStart.custom =
+ Constants.SIYUAN_KEYMAP.editor.general.selectToPageStart.default = "⇧⌘Home";
+ Constants.SIYUAN_KEYMAP.editor.general.selectToPageEnd.custom =
+ Constants.SIYUAN_KEYMAP.editor.general.selectToPageEnd.default = "⇧⌘End";
}
const matchKeymap1 = matchKeymap(Constants.SIYUAN_KEYMAP.general, "general");
const matchKeymap2 = matchKeymap(Constants.SIYUAN_KEYMAP.editor.general, "editor", "general");
diff --git a/app/src/constants.ts b/app/src/constants.ts
index d299e16cdc..ac81a83d3e 100644
--- a/app/src/constants.ts
+++ b/app/src/constants.ts
@@ -565,8 +565,8 @@ export abstract class Constants {
jumpToParent: {default: "⇧⌘J", custom: "⇧⌘J"},
moveToUp: {default: "⇧⌘↑", custom: "⇧⌘↑"},
moveToDown: {default: "⇧⌘↓", custom: "⇧⌘↓"},
- selectToPageStart: {default: "", custom: ""},
- selectToPageEnd: {default: "", custom: ""},
+ selectToPageStart: {default: "⇧Home", custom: "⇧Home"},
+ selectToPageEnd: {default: "⇧End", custom: "⇧End"},
duplicateCompletely: {default: "", custom: ""},
copyRichText: {default: "", custom: ""},
copyPlainText: {default: "", custom: ""},
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 1df8d5d989..ea44033cf0 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -1,5 +1,5 @@
import {hideElements} from "../ui/hideElements";
-import {isMac, isNotCtrl, isOnlyMeta, updateHotkeyTip, writeText} from "../util/compatibility";
+import {isNotCtrl, isOnlyMeta, updateHotkeyTip, writeText} from "../util/compatibility";
import {
focusBlock,
focusByRange,
@@ -678,34 +678,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
}
- if ((event.shiftKey && !event.altKey && isNotCtrl(event) && (event.key === "Home" || event.key === "End") && isMac()) ||
- (event.shiftKey && !event.altKey && isOnlyMeta(event) && (event.key === "Home" || event.key === "End") && !isMac())) {
- const topElement = hasTopClosestByAttribute(nodeElement, "data-node-id", null);
- if (topElement) {
- // 超级块内已选中某个块
- topElement.querySelectorAll(".protyle-wysiwyg--select").forEach(item => {
- item.classList.remove("protyle-wysiwyg--select");
- });
- topElement.classList.add("protyle-wysiwyg--select");
- const ids: string[] = [];
- ids.push(topElement.getAttribute("data-node-id"));
- let nextElement = event.key === "Home" ? topElement.previousElementSibling : topElement.nextElementSibling;
- while (nextElement) {
- nextElement.classList.add("protyle-wysiwyg--select");
- ids.push(nextElement.getAttribute("data-node-id"));
- nextElement = event.key === "Home" ? nextElement.previousElementSibling : nextElement.nextElementSibling;
- }
- countBlockWord(ids);
- if (event.key === "Home") {
- protyle.wysiwyg.element.firstElementChild.scrollIntoView();
- } else {
- protyle.wysiwyg.element.lastElementChild.scrollIntoView(false);
- }
- }
- event.stopPropagation();
- event.preventDefault();
- return;
- }
// https://github.com/siyuan-note/siyuan/issues/11726
if ((event.key === "Home" || event.key === "End") && !event.shiftKey && !event.altKey && isNotCtrl(event)) {
hideElements(["hint"], protyle);