From 43ec0a29972543131dbb3574c21f1961ad6e1410 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 16 Nov 2023 10:56:38 +0800 Subject: [PATCH] :bug: --- app/src/protyle/util/compatibility.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts index 004709522..290d294d5 100644 --- a/app/src/protyle/util/compatibility.ts +++ b/app/src/protyle/util/compatibility.ts @@ -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); }