focusedProperty
true
when this node has the input focus. Only 1 node per scene has the input focus.
Note, a node does not lose input focus when the Stage itself loses input focus. So to test if this node will receive keyboard events, check this property as well as Stage.focusedProperty.