feat(ui): fix delete layer hotkey

This commit is contained in:
psychedelicious 2024-08-23 17:17:40 +10:00
parent 1fa8048509
commit 2baf825f34
2 changed files with 5 additions and 2 deletions

View File

@ -28,5 +28,8 @@ export function useCanvasDeleteLayerHotkey() {
[selectedEntityIdentifier, isStaging]
);
useHotkeys('shift+d', deleteSelectedLayer, { enabled: isDeleteEnabled }, [isDeleteEnabled, deleteSelectedLayer]);
useHotkeys(['delete', 'backspace'], deleteSelectedLayer, { enabled: isDeleteEnabled }, [
isDeleteEnabled,
deleteSelectedLayer,
]);
}

View File

@ -101,7 +101,7 @@ const CurrentImageButtons = () => {
[isUpscalingEnabled, imageDTO, shouldDisableToolbarButtons, isConnected, isImageViewerActive]
);
useHotkeys('delete', handleDelete, { enabled: isImageViewerActive }, [imageDTO, isImageViewerActive]);
useHotkeys(['delete', 'backspace'], handleDelete, { enabled: isImageViewerActive }, [imageDTO, isImageViewerActive]);
return (
<>