public static boolean isToggleEvent(KeyEvent e, JComponent mainComponent) {
    return e.getKeyCode() == KeyEvent.VK_SPACE && SpeedSearchSupply.getSupply(mainComponent) == null;
  }
public static boolean isToggleEvent(KeyEvent e, JComponent mainComponent)