Key map, action map, delete

I'd like to hook up the action where the user presses DELETE key at the end of one child, which deletes its next-sibling. I can't seem to capture this event no matter what I try. Any ideas?

(The goal is that when I press DELETE at the end of the child, the child gets concatenated (say, the child is just a node with a string property) with the next-sibling instead of just deleting the next sibling. Similarly when I press BACKSPACE at the beginning of a child, it concatenates with the prev-sibling. I can do the BACKSPACE part by hooking up the DELETE action in the action map, but I can't do the DELETE part.)
You should be able to do that using action maps, but the following bug prevents you from doing it:

going to correct it now ;-)
OOps. I was wrong. For now to handle delete action on child nodes you have to add action map processing delete onto the cell referencing child nodes from parent node (CellModel_RefNodeList).

So, currently you can attach action map handling any common actions onto a cell editing child link declaration in parent node. In this case all specified actions should be applied to all top-level child cells created inside this collection (top-level cells for child nodes).
Thanks for the workaround. I'll give that a try. Meanwhile, I find it really difficult to use Action maps and Key maps, and everytime it is basically a trial and error process.

Are there plans to improve the editor key maps / action maps so that they can be easily used and customizable at a lower level? One example use case would be a multiline string that exist in some languages such as Python, and it's really difficult to mimic a text like editor in MPS, one reason of which is the difficulty of using action/key maps.
Yes we are planning to improve editor description in MPS in the next release. I'm not sure we will do a lot around actions, but at lease we are going to document it a bit. :-)

Please sign in to leave a comment.