Merge branch 'develop' into features/JAL-2068groovyAnnotationWorker
[jalview.git] / src / jalview / util / Platform.java
index b812feb..786f5bf 100644 (file)
@@ -20,6 +20,9 @@
  */
 package jalview.util;
 
+import java.awt.Toolkit;
+import java.awt.event.MouseEvent;
+
 /**
  * System platform information used by Applet and Application
  * 
@@ -74,4 +77,11 @@ public class Platform
     f.append(file.substring(lastp));
     return f.toString();
   }
+
+  public static boolean isControlDown(MouseEvent e)
+  {
+    return (jalview.util.Platform.isAMac() ? (Toolkit.getDefaultToolkit()
+            .getMenuShortcutKeyMask() & e.getModifiers()) != 0 : e
+            .isControlDown());
+  }
 }