Skip to content

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

:bug: 表格内粘贴代码块

Vanessa597d440947a2
diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts
index 4b5ad9c0d3..f17d016ec9 100644
--- a/app/src/config/keymap.ts
+++ b/app/src/config/keymap.ts
@@ -246,13 +246,26 @@ export const keymap = {
this.value = "";
});
}
+ } else if (event.key === "》") {
+ keymapStr += ">";
+ } else if (event.key === "《") {
+ keymapStr += "<";
+ } else if (event.key === "—") {
+ keymapStr += "-";
} else {
keymapStr += event.key.length > 1 ? event.key : event.key.toUpperCase();
}
}
this.setAttribute("data-value", keymapStr);
- this.value = updateHotkeyTip(keymapStr);
+ if (event.key === "—") {
+ // Mac 中文下会添加"——"
+ setTimeout(() => {
+ this.value = updateHotkeyTip(keymapStr);
+ });
+ } else {
+ this.value = updateHotkeyTip(keymapStr);
+ }
clearTimeout(timeout);
timeout = window.setTimeout(() => {
const keys = this.getAttribute("data-key").split(Constants.ZWSP);