diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 858416419..0ac300963 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -44,7 +44,11 @@ export class Gutter { constructor(protyle: IProtyle) { this.element = document.createElement("div"); this.element.className = "protyle-gutters"; - this.element.setAttribute("aria-label", window.siyuan.languages.gutterTip.replace(/⌘/g, updateHotkeyTip("⌘")).replace(/⌥/g, updateHotkeyTip("⌥")).replace(/⇧/g, updateHotkeyTip("⇧")).replace(/⌃/g, updateHotkeyTip("⌃"))); + if (/Mac/.test(navigator.platform) || navigator.platform === "iPhone") { + this.element.setAttribute("aria-label", window.siyuan.languages.gutterTip); + } else { + this.element.setAttribute("aria-label", window.siyuan.languages.gutterTip.replace(/⌘/g, "Ctrl+").replace(/⌥/g, "Alt+").replace(/⇧/g, "Shift+").replace(/⌃/g, "Ctrl+")); + } this.element.setAttribute("data-type", "a"); this.element.setAttribute("data-position", "right"); this.element.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => { diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts index 911fc102b..5cff4101a 100644 --- a/app/src/protyle/util/compatibility.ts +++ b/app/src/protyle/util/compatibility.ts @@ -101,6 +101,7 @@ export const updateHotkeyTip = (hotkey: string) => { const KEY_MAP = new Map(Object.entries({ "⌘": "Ctrl", + "⌃": "Ctrl", "⇧": "Shift", "⌥": "Alt", "⇥": "Tab",