title: how to properly detect which mouse buttons are down in JavaFX
body: <p>I've set a listener to my <code>Pane</code> so that it will detect mouse left and right buttons being down.
  But when I hold left mouse button, then press right one, previous action seem to lose it's effect!</p>
  
  <p>My code:</p>
  
  <pre><code>root.setOnMouseDragged(new EventHandler&lt;MouseEvent&gt;(){
      @Override
      public void handle(MouseEvent t) {
          if(t.getButton() == MouseButton.PRIMARY) f1();
          if(t.getButton() == MouseButton.SECONDARY) f2();
      }
  });
  </code></pre>
  
  <p>while holding LMB I have <code>f1()</code> running, but when I push RMB it seems like new event totally overwrites previous one: only <code>f2()</code> runs.</p>
  
  <p>How can I separate this two events?</p>