import { useMemo } from "react"; import { keyboard } from "@/lib/keyboard"; import { Kbd } from "@/ui/misc"; export function ShortcutsSettings() { const list = useMemo(() => keyboard.list(), []); const groups = useMemo(() => { const g = new Map(); for (const b of list) { const arr = g.get(b.group) ?? []; arr.push(b); g.set(b.group, arr); } return [...g.entries()]; }, [list]); return (

Keyboard shortcuts

Gmail-style shortcuts are always on. Press ? anywhere to see this list.

{groups.map(([group, items]) => (

{group}

{items.map((b) => (
{b.description}
))}
))} {!groups.length &&

Open the Mail view to see all shortcuts.

}
); }