export const formatKey = (key: string): string => {
    // Convert to uppercase for consistency
    const upperKey = key.toUpperCase();

    // Handle special keys
    switch (upperKey) {
        case "CONTROL":
            return "Ctrl";
        case "META":
            return "⌘";
        case "ALT":
            return "⌥";
        case "SHIFT":
            return "⇧";
        case "ARROWUP":
            return "↑";
        case "ARROWDOWN":
            return "↓";
        case "ARROWLEFT":
            return "←";
        case "ARROWRIGHT":
            return "→";
        case "ESCAPE":
            return "Esc";
        case "ENTER":
            return "Enter";
        case "BACKSPACE":
            return "⌫";
        case "DELETE":
            return "⌦";
        case "TAB":
            return "⇥";
        case "CAPSLOCK":
            return "⇪";
        default:
            return upperKey;
    }
};
