mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
This commit is contained in:
parent
816caa1cf8
commit
b7cfdd47dc
1 changed files with 6 additions and 3 deletions
|
|
@ -72,15 +72,18 @@ export const matchHotKey = (hotKey: string, event: KeyboardEvent) => {
|
|||
}
|
||||
}
|
||||
// 是否匹配 ⌥[] / ⌥⌘[]
|
||||
if (isMatchKey && (hotKeys.length === 3 ? isCtrl(event) : !isCtrl(event)) && event.altKey && !event.shiftKey) {
|
||||
if (isMatchKey && event.altKey && !event.shiftKey &&
|
||||
(hotKeys.length === 3 ? (isCtrl(event) && hotKey.startsWith("⌥⌘")) : !isCtrl(event))) {
|
||||
return true;
|
||||
}
|
||||
// ⌥⇧⌘[]
|
||||
if (isMatchKey && hotKey.startsWith("⌥⇧⌘") && hotKeys.length === 4 && event.altKey && event.shiftKey && isCtrl(event)) {
|
||||
if (isMatchKey && hotKey.startsWith("⌥⇧⌘") && hotKeys.length === 4 &&
|
||||
event.altKey && event.shiftKey && isCtrl(event)) {
|
||||
return true;
|
||||
}
|
||||
// ⌥⇧[]
|
||||
if (isMatchKey && hotKey.startsWith("⌥⇧") && hotKeys.length === 3 && event.altKey && event.shiftKey && !isCtrl(event)) {
|
||||
if (isMatchKey && hotKey.startsWith("⌥⇧") && hotKeys.length === 3 &&
|
||||
event.altKey && event.shiftKey && !isCtrl(event)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue