import { useState } from "react"; import { ArrowFatLineUp, Backspace, CaretDown, Command } from "@phosphor-icons/react"; type Shortcut = { keys: string[]; label: string; }; const shortcuts: Shortcut[] = [ { keys: ["S"], label: "Select" }, { keys: ["G"], label: "Generate" }, { keys: ["B"], label: "Brush" }, { keys: ["E"], label: "Eraser" }, { keys: ["K"], label: "Chroma key" }, { keys: ["W"], label: "Magic wand" }, { keys: ["⇧", "Click"], label: "Wand add" }, { keys: ["Alt", "Click"], label: "Wand subtract" }, { keys: ["P"], label: "Pan" }, { keys: ["Space"], label: "Hold to pan" }, { keys: ["L"], label: "Layers" }, { keys: ["⌘", "K"], label: "Commands" }, { keys: ["⌘", "O"], label: "Open image" }, { keys: ["⌘", "Z"], label: "Undo" }, { keys: ["⇧", "⌘", "Z"], label: "Redo" }, { keys: ["Del", "⌫"], label: "Delete" }, ]; export function ShortcutsDisplay() { const [open, setOpen] = useState(true); return ( ); } function keyIcon(key: string) { switch (key) { case "⌘": return ; case "⇧": return ; case "⌫": return ; default: return undefined; } }