Erase Selection from within any plugin (VK_DELETE)
-
I realized that, within any plugin, the user can type DEL and erase the selection if any (likewise, s/he can type Ctrl-A or Ctrl-T to Select all or Unselect All).
The problem with DEL key is that I did not find a good way to capture the event.
- you get a Key-UP event with VK_DELETE, but only AFTER the deletion is performed. So you have no clue what has been erased and even if something has been erased at all. When you get the VK_DELETE key, the selection is already empty.
- The Selection observers remain completely silent about the erasing of the current selection. No event is fired.
So my questions is whether there is a way to capture the DEL event, at least know if something was deleted.
Fredo
-
@fredo6 said:
- The Selection observers remain completely silent about the erasing of the current selection. No event is fired.
Not true... they are calling misspelled callbacks.
To see what the SkecthUp engine wants to call (even tho the spelling is a bug,) ... override the
respond_to?()method in your observer subclass, (being sure to pass the arg on tosuper,) butputs'ing the method name toSTDOUT.Once you know the mispelling... you can write wrapper callbacks that use the mispelled method name that simply call the correctly spelled callback (or just alias the bad names to the good names.)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement