mouse vs key

Tom Eugelink tbee at
Sat Jun 16 08:35:53 PDT 2012


Is there any reason why, when toggling a togglebutton, the mouse-released event is triggered AFTER the selected value of the togglebutton has changed, while the key-released is triggered BEFORE the selected value has changed?

The reason I ask is this; I need to know if the shift key was pressed when toggling a day button in the CalendarPicker in order to select a range. I used work based on the selectedProperty, but it does not give me access to the actual event (and the shiftDown flag) that caused it. So now I'm binding to the on-mouse-release and on-key-release, but the on key release executes too early.


More information about the openjfx-dev mailing list