@Override
  public void eventDispatched(AWTEvent event) {
    KeyEvent keyEvent = (KeyEvent)event;
    if ((keyEvent.getKeyCode() == KeyEvent.VK_ALT)) {
      if (keyEvent.getID() == KeyEvent.KEY_PRESSED) {
        firePressed();
      }
      else if (keyEvent.getID() == KeyEvent.KEY_RELEASED) {
        fireReleased();
      }
    }
  }
@Override
  public void eventDispatched(AWTEvent event)