public static boolean isControlOrMetaDown(KeyEvent e){
  if (!IS_MAC) {
    return e.isControlDown();
  }
 else {
    return e.isMetaDown();
  }
}

public static boolean isControlOrMetaDown ( KeyEvent e ) { if ( ! IS_MAC ) { return e . isControlDown ( ) ; } else { return e . isMetaDown ( ) ; } }
returns whether or not the control modifier is down during the event . this takes the os into account , so on mac it will check if the meta modifier is down during the event .
