🐛
This commit is contained in:
parent
2696349ff3
commit
43ec0a2997
1 changed files with 2 additions and 2 deletions
|
@ -138,12 +138,12 @@ export const updateHotkeyTip = (hotkey: string) => {
|
|||
|
||||
const keys = [];
|
||||
|
||||
if (hotkey.indexOf("⌘") > -1) keys.push(KEY_MAP.get("⌘"));
|
||||
if ((hotkey.indexOf("⌘") > -1 || hotkey.indexOf("⌃") > -1)) keys.push(KEY_MAP.get("⌘"));
|
||||
if (hotkey.indexOf("⇧") > -1) keys.push(KEY_MAP.get("⇧"));
|
||||
if (hotkey.indexOf("⌥") > -1) keys.push(KEY_MAP.get("⌥"));
|
||||
|
||||
// 不能去最后一个,需匹配 F2
|
||||
const lastKey = hotkey.replace(/⌘|⇧|⌥/g, "");
|
||||
const lastKey = hotkey.replace(/⌘|⇧|⌥|⌃/g, "");
|
||||
if (lastKey) {
|
||||
keys.push(KEY_MAP.get(lastKey) || lastKey);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue