title: KeyBindings in JavaFX 2
body: <p>How to use KeyBindings in JFX 2? I need to reassign Enter key from carrige returning to my own function, and for carrige returning assign CTRL+ENTER</p>
  
  <p>I've tried this way, but still it makes a new line.</p>
  
  <pre><code>messageArea.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler&lt;KeyEvent&gt;() {
          @Override
          public void handle(KeyEvent keyEvent) {
              if (keyEvent.getCode() == KeyCode.ENTER) {
                  sendMessage();
              }
          }
      });
  </code></pre>