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
|
||||
useHotkeys(
|
||||
'shift+w',
|
||||
(e: KeyboardEvent) => {
|
||||
e.preventDefault();
|
||||
() => {
|
||||
dispatch(toggleShouldLockBoundingBox());
|
||||
},
|
||||
{
|
||||
scopes: ['inpainting', 'outpainting'],
|
||||
preventDefault: true,
|
||||
},
|
||||
[activeTabName]
|
||||
);
|
||||
|
||||
useHotkeys(
|
||||
'shift+h',
|
||||
(e: KeyboardEvent) => {
|
||||
e.preventDefault();
|
||||
() => {
|
||||
dispatch(setShouldShowBoundingBox(!shouldShowBoundingBox));
|
||||
},
|
||||
{
|
||||
scopes: ['inpainting', 'outpainting'],
|
||||
preventDefault: true,
|
||||
},
|
||||
[activeTabName, shouldShowBoundingBox]
|
||||
);
|
||||
@ -94,7 +92,7 @@ const useInpaintingCanvasHotkeys = () => {
|
||||
{
|
||||
keyup: true,
|
||||
keydown: true,
|
||||
scopes: ['inpainting', 'outpainting'],
|
||||
preventDefault: true,
|
||||
},
|
||||
[tool, previousToolRef]
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user