Update Hotkey Info

Add missing tooltip hotkeys and update the hotkeys modal to reflect the new hotkeys for the Unified Canvas.
This commit is contained in:
blessedcoolant 2022-11-18 22:25:49 +13:00
parent 04cb2d39cb
commit 024acf42af
5 changed files with 63 additions and 61 deletions

View File

@ -92,8 +92,8 @@ const IAICanvasMaskButtonPopover = () => {
trigger="hover" trigger="hover"
triggerComponent={ triggerComponent={
<IAIIconButton <IAIIconButton
aria-label="Select Mask Layer" aria-label="Select Mask Layer (Q)"
tooltip="Select Mask Layer" tooltip="Select Mask Layer (Q)"
data-alert={layer === 'mask'} data-alert={layer === 'mask'}
onClick={handleToggleMaskLayer} onClick={handleToggleMaskLayer}
icon={<FaMask />} icon={<FaMask />}
@ -101,9 +101,11 @@ const IAICanvasMaskButtonPopover = () => {
} }
> >
<Flex direction={'column'} gap={'0.5rem'}> <Flex direction={'column'} gap={'0.5rem'}>
<IAIButton onClick={handleClearMask}>Clear Mask</IAIButton> <IAIButton onClick={handleClearMask} tooltip={'Clear Mask (Shift+C)'}>
Clear Mask
</IAIButton>
<IAICheckbox <IAICheckbox
label="Enable Mask" label="Enable Mask (H)"
isChecked={isMaskEnabled} isChecked={isMaskEnabled}
onChange={handleToggleEnableMask} onChange={handleToggleEnableMask}
/> />

View File

@ -48,8 +48,8 @@ export default function IAICanvasRedoButton() {
return ( return (
<IAIIconButton <IAIIconButton
aria-label="Redo" aria-label="Redo (Ctrl+Shift+Z)"
tooltip="Redo" tooltip="Redo (Ctrl+Shift+Z)"
icon={<FaRedo />} icon={<FaRedo />}
onClick={handleRedo} onClick={handleRedo}
isDisabled={!canRedo} isDisabled={!canRedo}

View File

@ -197,29 +197,29 @@ const IAICanvasOutpaintingControls = () => {
</ButtonGroup> </ButtonGroup>
<ButtonGroup isAttached> <ButtonGroup isAttached>
<IAIIconButton <IAIIconButton
aria-label="Merge Visible (Shift + M)" aria-label="Merge Visible (Shift+M)"
tooltip="Merge Visible (Shift + M)" tooltip="Merge Visible (Shift+M)"
icon={<FaLayerGroup />} icon={<FaLayerGroup />}
onClick={handleMergeVisible} onClick={handleMergeVisible}
isDisabled={isProcessing} isDisabled={isProcessing}
/> />
<IAIIconButton <IAIIconButton
aria-label="Save to Gallery (Shift + S)" aria-label="Save to Gallery (Shift+S)"
tooltip="Save to Gallery (Shift + S)" tooltip="Save to Gallery (Shift+S)"
icon={<FaSave />} icon={<FaSave />}
onClick={handleSaveToGallery} onClick={handleSaveToGallery}
isDisabled={isProcessing} isDisabled={isProcessing}
/> />
<IAIIconButton <IAIIconButton
aria-label="Copy to Clipboard (Cmd/Ctrl + C)" aria-label="Copy to Clipboard (Cmd/Ctrl+C)"
tooltip="Copy to Clipboard (Cmd/Ctrl + C)" tooltip="Copy to Clipboard (Cmd/Ctrl+C)"
icon={<FaCopy />} icon={<FaCopy />}
onClick={handleCopyImageToClipboard} onClick={handleCopyImageToClipboard}
isDisabled={isProcessing} isDisabled={isProcessing}
/> />
<IAIIconButton <IAIIconButton
aria-label="Download as Image (Shift + D)" aria-label="Download as Image (Shift+D)"
tooltip="Download as Image (Shift + D)" tooltip="Download as Image (Shift+D)"
icon={<FaDownload />} icon={<FaDownload />}
onClick={handleDownloadAsImage} onClick={handleDownloadAsImage}
isDisabled={isProcessing} isDisabled={isProcessing}
@ -239,8 +239,8 @@ const IAICanvasOutpaintingControls = () => {
icon={<FaUpload />} icon={<FaUpload />}
/> />
<IAIIconButton <IAIIconButton
aria-label="Reset Canvas View (R)" aria-label="Reset View (R)"
tooltip="Reset Canvas View (R)" tooltip="Reset View (R)"
icon={<FaCrosshairs />} icon={<FaCrosshairs />}
onClick={handleResetCanvasView} onClick={handleResetCanvasView}
/> />

View File

@ -49,8 +49,8 @@ export default function IAICanvasUndoButton() {
return ( return (
<IAIIconButton <IAIIconButton
aria-label="Undo" aria-label="Undo (Ctrl+Z)"
tooltip="Undo" tooltip="Undo (Ctrl+Z)"
icon={<FaUndo />} icon={<FaUndo />}
onClick={handleUndo} onClick={handleUndo}
isDisabled={!canUndo} isDisabled={!canUndo}

View File

@ -148,11 +148,6 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
desc: 'Selects the inpainting eraser', desc: 'Selects the inpainting eraser',
hotkey: 'E', hotkey: 'E',
}, },
{
title: 'Quick Toggle Brush/Eraser',
desc: 'Quick toggle between brush and eraser',
hotkey: 'X',
},
{ {
title: 'Decrease Brush Size', title: 'Decrease Brush Size',
desc: 'Decreases the size of the inpainting brush/eraser', desc: 'Decreases the size of the inpainting brush/eraser',
@ -164,30 +159,55 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
hotkey: ']', hotkey: ']',
}, },
{ {
title: 'Hide Mask', title: 'Move Tool',
desc: 'Hide and unhide mask', desc: 'Allows canvas navigation',
hotkey: 'H', hotkey: 'M',
}, },
{ {
title: 'Decrease Mask Opacity', title: 'Quick Toggle Move',
desc: 'Decreases the opacity of the mask', desc: 'Temporarily toggles Move mode',
hotkey: 'Shift+[', hotkey: 'Hold Space',
}, },
{ {
title: 'Increase Mask Opacity', title: 'Select Mask Layer',
desc: 'Increases the opacity of the mask', desc: 'Toggles mask layer',
hotkey: 'Shift+]', hotkey: 'Q',
},
{
title: 'Invert Mask',
desc: 'Invert the mask preview',
hotkey: 'Shift+M',
}, },
{ {
title: 'Clear Mask', title: 'Clear Mask',
desc: 'Clear the entire mask', desc: 'Clear the entire mask',
hotkey: 'Shift+C', hotkey: 'Shift+C',
}, },
{
title: 'Hide Mask',
desc: 'Hide and unhide mask',
hotkey: 'H',
},
{
title: 'Show/Hide Bounding Box',
desc: 'Toggle visibility of bounding box',
hotkey: 'Shift+H',
},
{
title: 'Merge Visible',
desc: 'Merge all visible layers of canvas',
hotkey: 'Shift+M',
},
{
title: 'Save To Gallery',
desc: 'Save current canvas to gallery',
hotkey: 'Shift+S',
},
{
title: 'Copy to Clipboard',
desc: 'Copy current canvas to clipboard',
hotkey: 'Ctrl+C',
},
{
title: 'Download Image',
desc: 'Download current canvas',
hotkey: 'Shift+D',
},
{ {
title: 'Undo Stroke', title: 'Undo Stroke',
desc: 'Undo a brush stroke', desc: 'Undo a brush stroke',
@ -199,29 +219,9 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
hotkey: 'Ctrl+Shift+Z, Ctrl+Y', hotkey: 'Ctrl+Shift+Z, Ctrl+Y',
}, },
{ {
title: 'Lock Bounding Box', title: 'Reset View',
desc: 'Locks the bounding box', desc: 'Reset Canvas View',
hotkey: 'Shift+W', hotkey: 'R',
},
{
title: 'Show/Hide Bounding Box',
desc: 'Toggle visibility of bounding box',
hotkey: 'Shift+H',
},
{
title: 'Quick Toggle Lock Bounding Box',
desc: 'Hold to toggle locking the bounding box',
hotkey: 'W',
},
{
title: 'Expand Inpainting Area',
desc: 'Expand your inpainting work area',
hotkey: 'Shift+J',
},
{
title: 'Erase Canvas',
desc: 'Erase the images on the canvas',
hotkey: 'Shift+E',
}, },
]; ];
@ -289,7 +289,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
<AccordionItem> <AccordionItem>
<AccordionButton className="hotkeys-modal-button"> <AccordionButton className="hotkeys-modal-button">
<h2>Inpainting Hotkeys</h2> <h2>Unified Canvas Hotkeys</h2>
<AccordionIcon /> <AccordionIcon />
</AccordionButton> </AccordionButton>
<AccordionPanel> <AccordionPanel>