Hi John, > - Would an event handler like KeyEvent.ANY at Preferred priority be > called before one for KeyEvent.KEY_PRESSED at Default or System priority?
Yes. > - The consumed flag doesn't change any other behavior? Consumed events > only are passed to handlers at the same level, but are not bubbled up > (or captured down); having consumed events not be passed to event > handlers (even at the same level) seems like a more sane default for sure It would surely be a better default behavior, but changing this has some compatibility risk. By the way, even with my current implementation, an event handler cannot elect to be invoked for events that were consumed on a different level. It would certainly be more consistent if an event handler that handles consumed events will be invoked regardless of where the event was consumed in the event route. > - Is there a need for three levels? If JavaFX behaves and adds it > handlers at SYSTEM level, then I don't think there is a need for user > handlers to have both DEFAULT and PREFERRED (they'd essentially do the > same, as long as the user is aware in which order they are adding their > own handlers). Having a PREFERRED priority enables applications to override DEFAULT handlers that were installed by controls that didn't know or care about the priority system. Maybe you don't control the code of these controls, so having an option to override default handlers seems useful. > - Is the order maintained within the various levels, ie, will the second > PREFERRED handler added be called 2nd? Yes.