fb43ca8e99
The mask overlay was always painted while the mask tool was open, at a fixed strength; it is now a persisted view toggle (O or the Mask button) with its own strength slider, so the photo underneath stays readable. The mask HUD also gains + and - so a brush can erase and a shape can subtract without leaving the canvas. Local texture, clarity, dehaze and sharpen sampled the baked masks at the view coordinate in the finish pass, so their coverage slid off the subject under a crop or zoom. The grade pass now writes each pixel's source coordinate to a second render target and the finish pass reads the masks through it, which also follows straightening and lens correction. The render gate checks the tint and a local dehaze amount through a quarter frame crop and a synthetic lens warp, plus the tint strength and toggle.
104 lines
3.5 KiB
TypeScript
104 lines
3.5 KiB
TypeScript
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 (
|
||
<div className="modal-backdrop" onPointerDown={(e) => e.target === e.currentTarget && onClose()}>
|
||
<div className="modal shortcuts-modal">
|
||
<header className="modal-head">
|
||
<h2>Keyboard shortcuts</h2>
|
||
<button className="icon-btn" onClick={onClose} title="Close">
|
||
✕
|
||
</button>
|
||
</header>
|
||
<div className="modal-body shortcut-grid">
|
||
{GROUPS.map((group) => (
|
||
<section key={group.title}>
|
||
<h3>{group.title}</h3>
|
||
{group.rows.map(([keys, what]) => (
|
||
<div className="shortcut-row" key={keys}>
|
||
<span className="shortcut-keys">{keys}</span>
|
||
<span className="shortcut-what">{what}</span>
|
||
</div>
|
||
))}
|
||
</section>
|
||
))}
|
||
<section className="shortcut-start">
|
||
<h3>Quick start</h3>
|
||
<p>Import a shoot, rate and pick frames in the library, then open Develop for the keepers.</p>
|
||
<p>Hover a panel seam to reveal its collapse tab. Press Tab to move focus, or ? for this list.</p>
|
||
<p>⌘K / Ctrl+K searches the whole catalog without changing your current filters.</p>
|
||
</section>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|