diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 26dde8b60..66f98bbae 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1292,7 +1292,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (!nodeElement.classList.contains("code-block")) { + if (!nodeElement.classList.contains("code-block") && !event.repeat) { const findToolbar = protyle.options.toolbar.find((menuItem: IMenuItem) => { if (!menuItem.hotkey) { return false; @@ -1497,7 +1497,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (matchHotKey(window.siyuan.config.keymap.editor.general.duplicate.custom, event)) { + if (!event.repeat && matchHotKey(window.siyuan.config.keymap.editor.general.duplicate.custom, event)) { event.preventDefault(); event.stopPropagation(); let selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));