File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/main/java/com/neuronrobotics/bowlerkernel/Bezier3d Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 55
66import java .util .HashMap ;
77
8+ import org .apache .sshd .common .util .OsUtils ;
9+
810import com .neuronrobotics .bowlerstudio .physics .TransformFactory ;
911import com .neuronrobotics .sdk .addons .kinematics .math .*;
1012import com .neuronrobotics .sdk .common .Log ;
1113
1214import eu .mihosoft .vrl .v3d .Vector3d ;
1315import javafx .event .EventHandler ;
1416import javafx .event .EventType ;
17+ import javafx .scene .input .KeyEvent ;
1518import javafx .scene .input .MouseEvent ;
1619//import javafx.scene.Node;
1720import javafx .scene .PerspectiveCamera ;
@@ -217,7 +220,7 @@ public void handle(MouseEvent event) {
217220 try {
218221 String name = event .getEventType ().getName ();
219222
220- if (event . isControlDown ( ))
223+ if (isControlOrCommandPressed ( event ))
221224 return ;
222225
223226 switch (name ) {
@@ -255,7 +258,12 @@ public void handle(MouseEvent event) {
255258 }
256259 };
257260 }
258-
261+ public static boolean isControlOrCommandPressed (MouseEvent event ) {
262+ return OsUtils .isOSX () ? event .isMetaDown () : event .isControlDown ();
263+ }
264+ public static boolean isControlOrCommandPressed (KeyEvent event ) {
265+ return OsUtils .isOSX () ? event .isMetaDown () : event .isControlDown ();
266+ }
259267 private void pressed (MouseEvent event ) {
260268 setState (DragState .Dragging );
261269
You can’t perform that action at this time.
0 commit comments