"use client"; import { useKeyboardShortcuts } from "@/hooks/use-keyboard-shortcuts"; import { Keyboard } from "lucide-react"; import { useState } from "react"; import { Button } from "./ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "./ui/dialog"; import { getPlatformSpecialKey } from "@/lib/utils"; const modifier: { [key: string]: string; } = { Shift: "Shift", Alt: "Alt", ArrowLeft: "←", ArrowRight: "→", ArrowUp: "↑", ArrowDown: "↓", Space: "Space", }; function getKeyWithModifier(key: string) { if (key === "Ctrl") return getPlatformSpecialKey(); return modifier[key] || key; } const ShortcutItem = ({ shortcut }: { shortcut: any }) => { // Filter out lowercase duplicates for display - if both "j" and "J" exist, only show "J" const displayKeys = shortcut.keys.filter((key: string) => { if ( key.includes("Cmd") && shortcut.keys.includes(key.replace("Cmd", "Ctrl")) ) return false; return true; }); return (