Use either backspace or delete for deleting components
This commit is contained in:
parent
37f9e7ad1d
commit
536dc56946
|
@ -15,21 +15,21 @@
|
||||||
</div>
|
</div>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="Delete"
|
icon="Delete"
|
||||||
keyBind="Del"
|
keyBind="!BackAndroid"
|
||||||
on:click={() => keyboardEvent("Delete")}
|
on:click={() => keyboardEvent("Delete")}
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="ChevronUp"
|
icon="ChevronUp"
|
||||||
keyBind="Ctrl+↑"
|
keyBind="Ctrl+!ArrowUp"
|
||||||
on:click={() => keyboardEvent("ArrowUp", true)}
|
on:click={() => keyboardEvent("ArrowUp", true)}
|
||||||
>
|
>
|
||||||
Move up
|
Move up
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="ChevronDown"
|
icon="ChevronDown"
|
||||||
keyBind="Ctrl+↓"
|
keyBind="Ctrl+!ArrowDown"
|
||||||
on:click={() => keyboardEvent("ArrowDown", true)}
|
on:click={() => keyboardEvent("ArrowDown", true)}
|
||||||
>
|
>
|
||||||
Move down
|
Move down
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
$goto("./new")
|
$goto("./new")
|
||||||
}
|
}
|
||||||
} else if (e.key === "Delete") {
|
} else if (e.key === "Backspace" || e.key === "Delete") {
|
||||||
// Don't show confirmation for the screen itself
|
// Don't show confirmation for the screen itself
|
||||||
if (component._id === get(selectedScreen).props._id) {
|
if (component._id === get(selectedScreen).props._id) {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue