I'm using a DatePicker control inside a Dialog window (created with the ControlsFX library). The dialog needs to close when the user presses the ESC button. It works perfectly as long as the DatePicker control does not have the focus. When other textfields, buttons etc. have the focus, the dialog closes perfectly.
Here's the problem: the DatePicker consumes the ESC key event when the calendar popup of the DatePicker is shown. It closes the calendar in this case, that's OK.
But it must not consume the ESC key event when no calendar popup is shown, the event needs to be passed to the next responsible consumer. Then the dialog would close properly.