Use either backspace or delete for deleting components

This commit is contained in:
Andrew Kingston 2022-08-17 14:47:20 +01:00
parent 16a7593f05
commit 62f017517d
2 changed files with 4 additions and 4 deletions

View File

@ -15,21 +15,21 @@
</div>
<MenuItem
icon="Delete"
keyBind="Del"
keyBind="!BackAndroid"
on:click={() => keyboardEvent("Delete")}
>
Delete
</MenuItem>
<MenuItem
icon="ChevronUp"
keyBind="Ctrl+"
keyBind="Ctrl+!ArrowUp"
on:click={() => keyboardEvent("ArrowUp", true)}
>
Move up
</MenuItem>
<MenuItem
icon="ChevronDown"
keyBind="Ctrl+"
keyBind="Ctrl+!ArrowDown"
on:click={() => keyboardEvent("ArrowDown", true)}
>
Move down

View File

@ -113,7 +113,7 @@
e.preventDefault()
$goto("./new")
}
} else if (e.key === "Delete") {
} else if (e.key === "Backspace" || e.key === "Delete") {
// Don't show confirmation for the screen itself
if (component._id === get(selectedScreen).props._id) {
return