ncase / loopy

A tool for thinking in systems
http://ncase.me/loopy/
Creative Commons Zero v1.0 Universal
1.64k stars 211 forks source link

keyboard delete key should delete selected object #3

Open PeterTheOne opened 7 years ago

calpa commented 7 years ago

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?

ncase commented 7 years ago

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

1000i100 commented 4 years ago

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.