Skip to content

Commit 869c913

Browse files
committedDec 8, 2023
🐛 中文输入法顿号
1 parent 6bafc1b commit 869c913

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
 

‎app/src/protyle/wysiwyg/keydown.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,18 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
145145
return;
146146
}
147147
// https://github.com/siyuan-note/siyuan/issues/2261
148-
if (isNotCtrl(event) && !event.shiftKey && !event.altKey) {
149-
if (Constants.KEYCODELIST[event.keyCode] === "/") {
148+
if (!["⌘", "⇧", "⌥", "⌃"].includes(Constants.KEYCODELIST[event.keyCode])) {
149+
if (Constants.KEYCODELIST[event.keyCode] === "/" ||
150+
// 德语
151+
event.key === "/" ||
152+
// windows 中文
153+
(event.code === "Slash" && event.key === "Process" && event.keyCode === 229)) {
150154
protyle.hint.enableSlash = true;
151-
} else if (Constants.KEYCODELIST[event.keyCode] === "\\") {
155+
} else if (Constants.KEYCODELIST[event.keyCode] === "\\" ||
156+
// 德语
157+
event.key === "\\" ||
158+
// windows 中文
159+
(event.code === "Backslash" && event.key === "Process" && event.keyCode === 229)) {
152160
protyle.hint.enableSlash = false;
153161
hideElements(["hint"], protyle);
154162
// 此处不能返回,否则无法撤销 https://github.com/siyuan-note/siyuan/issues/2795

0 commit comments

Comments
 (0)