import { useEffect } from 'react'; const GROUPS: { title: string; rows: [string, string][] }[] = [ { title: 'Everywhere', rows: [ ['?', 'Show or hide this list'], ['⌘ / Ctrl + K', 'Search photos, events and actions'], ['⌘ / Ctrl + I', 'Import photos'], ['⌘ / Ctrl + E', 'Export'], ['Esc', 'Close a dialog'], ], }, { title: 'Library', rows: [ ['G', 'Library grid'], ['E', 'Open in Develop'], ['← → ↑ ↓', 'Move the selection'], ['Shift + arrows', 'Extend the selection'], ['⌘ / Ctrl + A', 'Select all shown'], ['C', 'Compare selected photos'], ['1 – 5', 'Star rating'], ['0', 'Clear rating'], ['6 – 9', 'Red, yellow, green, blue label'], ['P / X / U', 'Pick · reject · unflag'], ['Delete', 'Remove selected photos'], ['⌘ / Ctrl + C / V', 'Copy · paste develop settings'], ['Drag on empty space', 'Rubber-band select'], ], }, { title: 'Develop', rows: [ ['Z', 'Fit · 100%'], ['C', 'Crop & straighten'], ['Q', 'Spot healing brush'], ['M', 'Edit the selected local mask'], ['O', 'Show or hide the mask tint'], ['Enter', 'Apply the crop'], ['\\ (hold)', 'Before / after'], ['1 – 5', 'Star rating'], ['0', 'Clear rating'], ['6 – 9', 'Red, yellow, green, blue label'], ['P / X / U', 'Pick · reject · unflag'], ['J / Shift + J', 'Highlight · shadow clipping'], ['F', 'Full-screen loupe with rating and flags'], ['← →', 'Previous · next photo'], ['Scroll · drag', 'Zoom · pan'], ['⌘ / Ctrl + Z', 'Undo'], ['⌘ / Ctrl + Shift + Z', 'Redo'], ['⌘ / Ctrl + C / V', 'Copy · paste settings'], ['Esc', 'Back to library'], ], }, ]; export default function Shortcuts({ onClose }: { onClose: () => void }) { useEffect(() => { const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') { e.preventDefault(); // Keep Escape from also closing the photo or crop behind the sheet. e.stopImmediatePropagation(); onClose(); } }; window.addEventListener('keydown', onKey, true); return () => window.removeEventListener('keydown', onKey, true); }, [onClose]); return (
e.target === e.currentTarget && onClose()}>

Keyboard shortcuts

{GROUPS.map((group) => (

{group.title}

{group.rows.map(([keys, what]) => (
{keys} {what}
))}
))}

Quick start

Import a shoot, rate and pick frames in the library, then open Develop for the keepers.

Hover a panel seam to reveal its collapse tab. Press Tab to move focus, or ? for this list.

⌘K / Ctrl+K searches the whole catalog without changing your current filters.

); }