loopy icon indicating copy to clipboard operation
loopy copied to clipboard

keyboard delete key should delete selected object

Open PeterTheOne opened this issue 9 years ago • 3 comments

PeterTheOne avatar Mar 24 '17 18:03 PeterTheOne

For node object, there is an kill() function. I wonder how to add an eventListener of KeyCodes 46(DELETE) inside the node... Using subscribe() or other method?

calpa avatar Mar 26 '17 11:03 calpa

How could I have forgotten that! Thanks for the feature request, I'll put it in once I'm done trudging through emails. The only small hiccup I'd have to consider is that the delete key should delete the selected object unless you're typing in a text field

ncase avatar Mar 26 '17 15:03 ncase

i've done that in #20 : when you press delete key, it delete the text of the object. If you press it again (if there is no text for the entity, then it kill it.

1000i100 avatar Apr 19 '20 05:04 1000i100