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

View File

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

View File

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

View File

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

View File

@ -148,11 +148,6 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
desc: 'Selects the inpainting eraser',
hotkey: 'E',
},
{
title: 'Quick Toggle Brush/Eraser',
desc: 'Quick toggle between brush and eraser',
hotkey: 'X',
},
{
title: 'Decrease Brush Size',
desc: 'Decreases the size of the inpainting brush/eraser',
@ -164,30 +159,55 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
hotkey: ']',
},
{
title: 'Hide Mask',
desc: 'Hide and unhide mask',
hotkey: 'H',
title: 'Move Tool',
desc: 'Allows canvas navigation',
hotkey: 'M',
},
{
title: 'Decrease Mask Opacity',
desc: 'Decreases the opacity of the mask',
hotkey: 'Shift+[',
title: 'Quick Toggle Move',
desc: 'Temporarily toggles Move mode',
hotkey: 'Hold Space',
},
{
title: 'Increase Mask Opacity',
desc: 'Increases the opacity of the mask',
hotkey: 'Shift+]',
},
{
title: 'Invert Mask',
desc: 'Invert the mask preview',
hotkey: 'Shift+M',
title: 'Select Mask Layer',
desc: 'Toggles mask layer',
hotkey: 'Q',
},
{
title: 'Clear Mask',
desc: 'Clear the entire mask',
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',
desc: 'Undo a brush stroke',
@ -199,29 +219,9 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
hotkey: 'Ctrl+Shift+Z, Ctrl+Y',
},
{
title: 'Lock Bounding Box',
desc: 'Locks the bounding box',
hotkey: 'Shift+W',
},
{
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',
title: 'Reset View',
desc: 'Reset Canvas View',
hotkey: 'R',
},
];
@ -289,7 +289,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
<AccordionItem>
<AccordionButton className="hotkeys-modal-button">
<h2>Inpainting Hotkeys</h2>
<h2>Unified Canvas Hotkeys</h2>
<AccordionIcon />
</AccordionButton>
<AccordionPanel>