diff --git a/src/hooks/useMapSelection.tsx b/src/hooks/useMapSelection.tsx index 80d6cef..60e5a73 100644 --- a/src/hooks/useMapSelection.tsx +++ b/src/hooks/useMapSelection.tsx @@ -110,6 +110,19 @@ function useMapSelection( if (shortcuts.duplicate(event)) { setDuplicateSelection(true); } + if (shortcuts.delete(event) && selection && active) { + const tokenIds: string[] = []; + const noteIds: string[] = []; + for (let item of selection.items) { + if (item.type === "token") { + tokenIds.push(item.id); + } else { + noteIds.push(item.id); + } + } + handleSelectionItemsRemove(tokenIds, noteIds); + setIsSelectionMenuOpen(false); + } } function handleKeyUp(event: KeyboardEvent) {