import { Eyebrow } from "../../ui"; import { useT } from "../../../i18n"; import { isMac } from "../../../lib/platform"; /** * Read-only keyboard shortcut reference. Listed in the settings page * because this is where users look when they want to remember how to * invoke a hotkey; it is NOT a configurable surface — so the visuals * are lighter than the other settings sections (no active state, no * action buttons). */ export function ShortcutsSection() { const t = useT(); const mac = isMac(); const rows: Array<[string, string]> = [ [mac ? "⌘K" : "Ctrl+K", t("settings.shortcut.commandPalette")], [mac ? "⌘Enter" : "Ctrl+Enter", t("settings.shortcut.sendMessage")], ["Escape", t("settings.shortcut.closeModal")], ["↑ / ↓", t("settings.shortcut.navigatePalette")], ["Enter", t("settings.shortcut.selectPaletteResult")], ["Tab", t("settings.shortcut.moveFocus")], ]; return (
{t("settings.keyboardShortcuts")}
{rows.map(([key, description]) => (
{description} {key}
))}
); }