mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🐛 中文输入法顿号
This commit is contained in:
parent
6bafc1b050
commit
869c9138e1
1 changed files with 11 additions and 3 deletions
|
|
@ -145,10 +145,18 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
return;
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/2261
|
||||
if (isNotCtrl(event) && !event.shiftKey && !event.altKey) {
|
||||
if (Constants.KEYCODELIST[event.keyCode] === "/") {
|
||||
if (!["⌘", "⇧", "⌥", "⌃"].includes(Constants.KEYCODELIST[event.keyCode])) {
|
||||
if (Constants.KEYCODELIST[event.keyCode] === "/" ||
|
||||
// 德语
|
||||
event.key === "/" ||
|
||||
// windows 中文
|
||||
(event.code === "Slash" && event.key === "Process" && event.keyCode === 229)) {
|
||||
protyle.hint.enableSlash = true;
|
||||
} else if (Constants.KEYCODELIST[event.keyCode] === "\\") {
|
||||
} else if (Constants.KEYCODELIST[event.keyCode] === "\\" ||
|
||||
// 德语
|
||||
event.key === "\\" ||
|
||||
// windows 中文
|
||||
(event.code === "Backslash" && event.key === "Process" && event.keyCode === 229)) {
|
||||
protyle.hint.enableSlash = false;
|
||||
hideElements(["hint"], protyle);
|
||||
// 此处不能返回,否则无法撤销 https://github.com/siyuan-note/siyuan/issues/2795
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue