diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-26 12:54:50 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-26 12:54:50 +0200 |
| commit | 6dfc80cd70db08f847d114bdbae582c9983bb83e (patch) | |
| tree | bd5d5fa5fe033d461a8b6c3003bec64451464626 /apps/web/src/hooks/use-keyboard-shortcuts-help.ts | |
| parent | 043bf7d70abb705059bed5c0dbcc8007448750ec (diff) | |
| download | opencut-6dfc80cd70db08f847d114bdbae582c9983bb83e.tar.gz | |
Merge pull request [#433](https://github.com/mazeincoding/AppCut/issues/433)
Diffstat (limited to 'apps/web/src/hooks/use-keyboard-shortcuts-help.ts')
| -rw-r--r-- | apps/web/src/hooks/use-keyboard-shortcuts-help.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/web/src/hooks/use-keyboard-shortcuts-help.ts b/apps/web/src/hooks/use-keyboard-shortcuts-help.ts index c7de8466..2f1a4d4a 100644 --- a/apps/web/src/hooks/use-keyboard-shortcuts-help.ts +++ b/apps/web/src/hooks/use-keyboard-shortcuts-help.ts @@ -3,6 +3,7 @@ import { useMemo } from "react"; import { useKeybindingsStore } from "@/stores/keybindings-store"; import { Action } from "@/constants/actions"; +import { getPlatformAlternateKey, getPlatformSpecialKey } from "@/lib/utils"; export interface KeyboardShortcut { id: string; @@ -67,13 +68,13 @@ const actionDescriptions: Record< // Convert key binding format to display format const formatKey = (key: string): string => { return key - .replace("ctrl", "Cmd") - .replace("alt", "Alt") + .replace("ctrl", getPlatformSpecialKey()) + .replace("alt", getPlatformAlternateKey()) .replace("shift", "Shift") - .replace("left", "ArrowLeft") - .replace("right", "ArrowRight") - .replace("up", "ArrowUp") - .replace("down", "ArrowDown") + .replace("left", "←") + .replace("right", "→") + .replace("up", "↑") + .replace("down", "↓") .replace("space", "Space") .replace("home", "Home") .replace("end", "End") |
