mouse vs key

Tom Eugelink tbee at tbee.org
Sat Jun 16 09:09:56 PDT 2012


And I need to use the mouse and key events, because only registering the shift key state in the on-mouse or on-key but keep using the selectedProperty does not work, because the togglebutton doesn't toggle the state when shift is pressed.

Tom


On 2012-06-16 17:35, Tom Eugelink wrote:
> Jonathan,
>
> 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.
>
> Tom
>



More information about the openjfx-dev mailing list