File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -145,10 +145,18 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
145
145
return ;
146
146
}
147
147
// 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 ) ) {
150
154
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 ) ) {
152
160
protyle . hint . enableSlash = false ;
153
161
hideElements ( [ "hint" ] , protyle ) ;
154
162
// 此处不能返回,否则无法撤销 https://github.com/siyuan-note/siyuan/issues/2795
You can’t perform that action at this time.
0 commit comments