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/11511

Vanessa56eeedc20a26
diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts
index ea94b2bfc9..a4fcdbcc8f 100644
--- a/app/src/config/keymap.ts
+++ b/app/src/config/keymap.ts
@@ -229,7 +229,7 @@ export const keymap = {
keymap.element.querySelectorAll("#keymapList .b3-list-item--hide-action > .b3-list-item__text").forEach(item => {
const liElement = item.parentElement;
let matchedKeymap = false;
- if (keymapString === "" || (liElement.querySelector(".b3-text-field") as HTMLInputElement).value.indexOf(updateHotkeyTip(keymapString)) > -1) {
+ if (keymapString === "" || liElement.querySelector(".b3-text-field").getAttribute("data-value").indexOf(keymapString) > -1) {
matchedKeymap = true;
}
if ((item.textContent.toLowerCase().indexOf(value.toLowerCase()) > -1 || value.toLowerCase().indexOf(item.textContent.toLowerCase()) > -1 || value === "") && matchedKeymap) {
@@ -298,13 +298,13 @@ export const keymap = {
const searchElement = keymap.element.querySelector("#keymapInput") as HTMLInputElement;
const searchKeymapElement = keymap.element.querySelector("#searchByKey") as HTMLInputElement;
searchElement.addEventListener("compositionend", () => {
- keymap.search(searchElement.value, searchKeymapElement.value);
+ keymap.search(searchElement.value, searchKeymapElement.dataset.value);
});
searchElement.addEventListener("input", (event: InputEvent) => {
if (event.isComposing) {
return;
}
- keymap.search(searchElement.value, searchKeymapElement.value);
+ keymap.search(searchElement.value, searchKeymapElement.dataset.value);
});
/// #if !BROWSER
searchKeymapElement.addEventListener("focus", () => {
@@ -325,6 +325,7 @@ export const keymap = {
setTimeout(() => {
this.value = updateHotkeyTip(keymapStr);
});
+ this.dataset.keymap = keymapStr;
keymap.search(searchElement.value, keymapStr);
});
keymap.element.querySelector("#clearSearchBtn").addEventListener("click", () => {