Yes, I’m using 5.3.1, apparently I was looking at the wrong source code. However, the correct code you linked to is problematic – the documentation for KeyEvent says “Generally, if the item acts on the key event then it should be accepted so that ancestor items do not also respond to the same event” which definitely applies in this case. So either the author of this code made a mistake (in which case they should fix it) or they have something very clever in mind where they deliberately went against the documentation (in which case they need to add a comment and also explain in the documentation what is happening.
You have an interesting suggestion – that maybe this was done deliberately so that users could also implement Keys.onUpPressed and perform some actions, but the actions I perform will be different depending on whether TableView has already acted on the keypress or not – and the only way to find that out is by TableView.onUpPressed setting event.accepted to true …
↧