attachTo

fun attachTo(node: Node)

Adds an onKeyPressed event handler to node, which checks the KeyEvent against each action's Command.keyCombination and Command.additionalKeyCombinations.

If there is a matching Action, and Action.disableProperty.value != true :

  1. If it is a ToggleAction, then ToggleAction.selectedProperty is toggled.

  2. Action.lambda is invoked.

If there are multiple matches, only the first matching Action is considered.