mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-18 22:36:10 +01:00
This commit is contained in:
parent
3979a72d16
commit
d9ae179218
1 changed files with 8 additions and 0 deletions
|
|
@ -47,6 +47,14 @@ export const matchHotKey = (hotKey: string, event: KeyboardEvent) => {
|
|||
return false;
|
||||
}
|
||||
|
||||
// https://github.com/siyuan-note/siyuan/issues/9770
|
||||
if (hotKey.startsWith("⌃") && !isMac()) {
|
||||
hotKey = hotKey.replace("⌘", "").replace("⌃", "⌘")
|
||||
.replace("⌘⇧", "⇧⌘")
|
||||
.replace("⌘⌥⇧", "⌥⇧⌘")
|
||||
.replace("⌘⌥", "⌥⌘");
|
||||
}
|
||||
|
||||
// []
|
||||
if (hotKey.indexOf("⇧") === -1 && hotKey.indexOf("⌘") === -1 && hotKey.indexOf("⌥") === -1 && hotKey.indexOf("⌃") === -1) {
|
||||
if (isNotCtrl(event) && !event.altKey && !event.shiftKey && hotKey === Constants.KEYCODELIST[event.keyCode]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue