title: Javafx imageView rotation when key pressed
body: <p>Basically, I want to rotate an ImageView by 90 degrees when the user hits R on the keyboard.</p>
  
  <pre><code>@FXML
  private Image arrow;
  @FXML
  private ImageView arrowDirection;
  
  
  @FXML
  public void arrowRotation(KeyEvent keyEvent)
  {
      if(keyEvent.getCode() == KeyCode.R)
      arrowDirection.setRotate(90);
  }
  </code></pre>