The open-source CapCut alternative
display key based on OS
Kha Nguyena434459a9c0b
diff --git a/apps/web/src/hooks/use-keyboard-shortcuts-help.ts b/apps/web/src/hooks/use-keyboard-shortcuts-help.tsindex c7de8466..808bf25f 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,8 +68,8 @@ const actionDescriptions: Record<// Convert key binding format to display formatconst 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")