mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Hotkeys improvement
This commit is contained in:
parent
7831468304
commit
0a2e67df1a
@ -48,24 +48,22 @@ const useInpaintingCanvasHotkeys = () => {
|
|||||||
// Toggle lock bounding box
|
// Toggle lock bounding box
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
'shift+w',
|
'shift+w',
|
||||||
(e: KeyboardEvent) => {
|
() => {
|
||||||
e.preventDefault();
|
|
||||||
dispatch(toggleShouldLockBoundingBox());
|
dispatch(toggleShouldLockBoundingBox());
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scopes: ['inpainting', 'outpainting'],
|
preventDefault: true,
|
||||||
},
|
},
|
||||||
[activeTabName]
|
[activeTabName]
|
||||||
);
|
);
|
||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
'shift+h',
|
'shift+h',
|
||||||
(e: KeyboardEvent) => {
|
() => {
|
||||||
e.preventDefault();
|
|
||||||
dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox));
|
dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox));
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scopes: ['inpainting', 'outpainting'],
|
preventDefault: true,
|
||||||
},
|
},
|
||||||
[activeTabName, shouldShowBoundingBox]
|
[activeTabName, shouldShowBoundingBox]
|
||||||
);
|
);
|
||||||
@ -94,7 +92,7 @@ const useInpaintingCanvasHotkeys = () => {
|
|||||||
{
|
{
|
||||||
keyup: true,
|
keyup: true,
|
||||||
keydown: true,
|
keydown: true,
|
||||||
scopes: ['inpainting', 'outpainting'],
|
preventDefault: true,
|
||||||
},
|
},
|
||||||
[tool, previousToolRef]
|
[tool, previousToolRef]
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user