mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-23 16:56:10 +01:00
This commit is contained in:
parent
e793431202
commit
09cde5cc04
1 changed files with 7 additions and 5 deletions
|
|
@ -45,13 +45,15 @@ export const matchHotKey = (hotKey: string, event: KeyboardEvent) => {
|
|||
}
|
||||
|
||||
// 是否匹配 ⇧[]
|
||||
if (hotKey.startsWith("⇧") && hotKeys.length === 2 && !event.ctrlKey && !isCtrl(event) && !event.altKey && event.shiftKey) {
|
||||
if (event.code.startsWith("Digit") || event.code.startsWith("Numpad")) {
|
||||
if (hotKeys[1] === event.code.slice(-1)) {
|
||||
if (hotKey.startsWith("⇧") && hotKeys.length === 2) {
|
||||
if (!event.ctrlKey && !isCtrl(event) && !event.altKey && event.shiftKey) {
|
||||
if (event.code.startsWith("Digit") || event.code.startsWith("Numpad")) {
|
||||
if (hotKeys[1] === event.code.slice(-1)) {
|
||||
return true;
|
||||
}
|
||||
} else if (event.key === hotKeys[1]) {
|
||||
return true;
|
||||
}
|
||||
} else if (event.key === hotKeys[1]) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue