1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00

Use either backspace or delete for deleting components

This commit is contained in:
Andrew Kingston 2022-08-17 14:47:20 +01:00
parent 37f9e7ad1d
commit 536dc56946
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