For any Perspective component, the onKeyPress Event requires that the component have focus (otherwise any component with a similar event would also fire). I don’t believe that the tree ever actually gets focus though, because it isn’t an input. So I wouldn’t expect that event to do anything when used as part o the Tree component.
There is development underway for a key-listener for Sessions. It could possibly work for you, depending on what you’re trying to do. It captures key strokes within the session and allows for firing actions based off of the keystrokes. You would need some logic like this within the script action for the upcoming Event/Listener:
modification_keys = ['w', 'a', 's', 'd']
if event.page.props.path == 'some/arbitrary/path' and event.key in modification_keys:
# do something to the tree with event.key
I just wanted to select the object from menu, press ENTER and it opens Vision Window for object. That’s all.
But… I found another solution for this: I just use for it onContextMenu Event.
But… now I know this Information You posted and I’ll try it next time for sure!
Did this Event/Listener ever get implemented? I don't see it in the manual, but I'm also terrible at finding food in the fridge, so I probably missed this in the manual as well.