attachTo

fun attachTo(node: Node)

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

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

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

  2. Command.lambda is invoked.

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