title: Key SPACE acts like focused button
body: <p>Whenever SPACE key is pressed, it is registered and processed as a last pressed (focused) button. I cannot capture it as KeyEvent, and it acts as a button.</p>
  
  <p>I want to generate and pass on char from buttons and keyboard keys pressed.</p>
  
  <p>Here is the handler part of my code in the controller class:</p>
  
  <pre><code>public void handleKeys(KeyEvent key) {
      char chr = key.getText().charAt(0);
      handleSymbols(chr);
      key.consume();
  }
  
  public void handleBtns(ActionEvent buttonPressed) {
      char chr = buttonPressed.getSource().toString().toLowerCase().charAt(buttonPressed.getSource().toString().length() - 2);
      handleSymbols(chr);
      buttonPressed.consume();
  }
  </code></pre>
  
  <p>Here is the FXML file beginning:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
   &lt;?import javafx.geometry.*?&gt;
   &lt;?import javafx.scene.control.*?&gt;
   &lt;?import javafx.scene.layout.*?&gt;
  
   &lt;BorderPane fx:id="container" prefHeight="500.0" prefWidth="400.0" style="-fx-background-color: #00e600"
          stylesheets="/sample/main.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
          fx:controller="sample.Controller"
          onKeyPressed="#handleKeys"&gt;
  
  &lt;left&gt;
      &lt;VBox prefHeight="300.0" prefWidth="50.0"&gt;
          &lt;BorderPane.margin&gt;
              &lt;Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /&gt;
          &lt;/BorderPane.margin&gt;
  
              &lt;Button onAction="#handleBtns" prefHeight="135.0" prefWidth="50" text="+"&gt;
                  &lt;VBox.margin&gt;
                      &lt;Insets bottom="20.0" /&gt;
                  &lt;/VBox.margin&gt;
              &lt;/Button&gt;
              &lt;Button onAction="#handleBtns" prefHeight="135.0" prefWidth="50" text="-" /&gt;
  
      &lt;/VBox&gt;
  &lt;/left&gt;
  </code></pre>
  
  <p>There is something similar here, but for SWING, so it does not work:<a href="https://stackoverflow.com/questions/4472530/jbutton-referring-to-space-bar-the-same-as-a-click">Disabling space bar triggering click for JButton</a></p>
  
  <p>How can i unbind SPACE as a default key for focused buttons? I just don't want SPACE to act as a button.</p>