= {
+ // Modifiers
+ ctrl: 'Ctrl',
+ control: 'Ctrl',
+ cmd: 'Cmd',
+ command: 'Cmd',
+ meta: 'Meta',
+ alt: 'Alt',
+ option: 'Alt',
+ shift: 'Shift',
+ // Special keys
+ enter: 'Enter',
+ return: 'Enter',
+ esc: 'Esc',
+ escape: 'Esc',
+ tab: 'Tab',
+ space: 'Space',
+ backspace: 'Backspace',
+ delete: 'Del',
+ // Arrow keys (support both symbols and names)
+ up: '↑',
+ down: '↓',
+ left: '←',
+ right: '→',
+ arrowup: '↑',
+ arrowdown: '↓',
+ arrowleft: '←',
+ arrowright: '→',
+}
+
+/**
+ * Displays keyboard shortcuts in terminal-style format.
+ * Parses key combinations and renders them as styled badges.
+ *
+ * @param keys - Keyboard shortcut string (e.g., 'Ctrl+C', 'Alt+Tab', '↑')
+ * @param description - Optional description of what the shortcut does
+ * @param variant - Visual variant for semantic color
+ * @param className - Additional classes applied to the root element
+ *
+ * @example
+ * ```tsx
+ *
+ *
+ *
+ *
+ * ```
+ */
+export function TerminalKeybinding({
+ keys,
+ description,
+ variant = 'neutral',
+ className = '',
+}: TerminalKeybindingProps) {
+ // Parse the keys string (split by + or -)
+ const keyParts = keys
+ .split(/[\+\-]/)
+ .map((k) => k.trim())
+ .filter(Boolean)
+ .map((k) => {
+ const lower = k.toLowerCase()
+ return KEY_DISPLAY_MAP[lower] || k
+ })
+
+ const variantClass = variantClasses[variant]
+
+ return (
+
+ {/* Key badges */}
+
+ {keyParts.map((key, i) => (
+
+ {i > 0 && (
+ +
+ )}
+
+ {key}
+
+
+ ))}
+
+
+ {/* Optional description */}
+ {description && (
+ {description}
+ )}
+
+ )
+}
diff --git a/components/terminal.tsx b/components/terminal.tsx
index 56c9e1f..5c690f7 100644
--- a/components/terminal.tsx
+++ b/components/terminal.tsx
@@ -264,3 +264,4 @@ export { TerminalAutocomplete, useAutocomplete, COMMON_COMMANDS, COMMON_FLAGS, f
export { TerminalGhosttyTheme, GhosttyThemePicker } from './terminal-ghostty'
export { ThemeSwitcher } from './theme-switcher'
export { TerminalBadge } from './terminal-badge'
+export { TerminalKeybinding } from './terminal-keybinding'