title: Prevent Button from firing when enter or space is pressed Javafx
body: <p>I have a button on a Scene, that whenever the space bar or enter key is pressed, this button automatically fires. I want the user to be able to type  these keys without this button firing. I have already tried doing <code>root.requestFocus()</code> and calling the request focus method on other nodes in my scene. How can I prevent this button from firing when these keys are pressed. Thanks for any help.</p>
  
  <p>Edit:
  So far I have just done the boiler plate code to make a Javafx application work, added that button and a few labels. I have tried the requestFocus() method in several nodes in my application, none of which has made a difference. I also have a <code>scene.setOnKeyPressed</code> action event listener for keys pressed.</p>