Skip to content

Commit 00af1ca

Browse files
AmirMohammad CheraghaliAmirMohammad Cheraghali
authored andcommitted
docs: Update keyboard shortcuts and add to Command Palette
1 parent 6ec0f70 commit 00af1ca

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/App.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type { PDBMetadata, Measurement, MeasurementTextColor } from './types';
2020
import {
2121
Camera, RefreshCw, Upload,
2222
Settings, Zap, Activity, Grid3X3, Palette,
23-
Share2, Save, FolderOpen, Video, Ruler, Maximize2, Star
23+
Share2, Save, FolderOpen, Video, Ruler, Maximize2, Star, Undo2, Redo2
2424
} from 'lucide-react';
2525
import { startOnboardingTour } from './components/TourGuide';
2626
import { ToastContainer } from './components/Toast';
@@ -1007,6 +1007,22 @@ function App() {
10071007
category: 'View',
10081008
perform: handleResetView
10091009
},
1010+
{
1011+
id: 'undo',
1012+
label: 'Undo',
1013+
icon: Undo2,
1014+
shortcut: 'Cmd/Ctrl+Z',
1015+
category: 'Edit',
1016+
perform: () => { if (canUndo) undo(); }
1017+
},
1018+
{
1019+
id: 'redo',
1020+
label: 'Redo',
1021+
icon: Redo2,
1022+
shortcut: 'Shift+Cmd/Ctrl+Z',
1023+
category: 'Edit',
1024+
perform: () => { if (canRedo) redo(); }
1025+
},
10101026
{
10111027
id: 'toggle-pub-mode',
10121028
label: isPublicationMode ? 'Exit Publication Mode' : 'Enter Publication Mode',

src/components/HelpGuide.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ export const HelpGuide: React.FC<{ isVisible?: boolean }> = ({ isVisible = true
221221
<div className="flex justify-between text-neutral-300"><span>Full Screen</span> <kbd className="font-mono bg-neutral-800 px-1.5 rounded text-neutral-400">F</kbd></div>
222222
<div className="flex justify-between text-neutral-300"><span>Theme Toggle</span> <kbd className="font-mono bg-neutral-800 px-1.5 rounded text-neutral-400">T</kbd></div>
223223
<div className="flex justify-between text-neutral-300"><span>Screenshot</span> <kbd className="font-mono bg-neutral-800 px-1.5 rounded text-neutral-400">S</kbd></div>
224+
<div className="flex justify-between text-neutral-300"><span>Undo</span> <kbd className="font-mono bg-neutral-800 px-1.5 rounded text-neutral-400">⌘Z / Ctrl+Z</kbd></div>
225+
<div className="flex justify-between text-neutral-300"><span>Redo</span> <kbd className="font-mono bg-neutral-800 px-1.5 rounded text-neutral-400">⇧⌘Z / Shift+Ctrl+Z</kbd></div>
224226

225227
<div className="col-span-2 pb-1 mb-1 mt-3 border-b border-neutral-800 font-bold text-neutral-400 uppercase tracking-widest text-[10px]">Views</div>
226228
<div className="flex justify-between text-neutral-300"><span>Reset View</span> <kbd className="font-mono bg-neutral-800 px-1.5 rounded text-neutral-400">R</kbd></div>

0 commit comments

Comments
 (0)