@Override public void keyPressed(KeyEvent e){
  if (enableArrowKeys && e.isActionKey() && e.getKeyCode() == KeyEvent.VK_RIGHT) {
    e.consume();
    openPopup();
    if (popup != null) {
      timeMenuPanel.selectFirstEntry();
    }
  }
  if (enableArrowKeys && e.isActionKey() && e.getKeyCode() == KeyEvent.VK_UP) {
    e.consume();
    if (upPressed || !isEnabled()) {
      return;
    }
    upPressed=true;
    if (getTime() == null) {
      setTime(LocalTime.NOON);
    }
    zInternalTryChangeTimeByIncrement(1);
    increaseTimer.start();
  }
  if (enableArrowKeys && e.isActionKey() && e.getKeyCode() == KeyEvent.VK_DOWN) {
    e.consume();
    if (downPressed || !isEnabled()) {
      return;
    }
    downPressed=true;
    if (getTime() == null) {
      setTime(LocalTime.NOON);
    }
    zInternalTryChangeTimeByIncrement(-1);
    decreaseTimer.start();
  }
}

@ Override public void keyPressed ( KeyEvent e ) { if ( enableArrowKeys && e . isActionKey ( ) && e . getKeyCode ( ) == KeyEvent . VK_RIGHT ) { e . consume ( ) ; openPopup ( ) ; if ( popup != null ) { timeMenuPanel . selectFirstEntry ( ) ; } } if ( enableArrowKeys && e . isActionKey ( ) && e . getKeyCode ( ) == KeyEvent . VK_UP ) { e . consume ( ) ; if ( upPressed || ! isEnabled ( ) ) { return ; } upPressed = true ; if ( getTime ( ) == null ) { setTime ( LocalTime . NOON ) ; } zInternalTryChangeTimeByIncrement ( 1 ) ; increaseTimer . start ( ) ; } if ( enableArrowKeys && e . isActionKey ( ) && e . getKeyCode ( ) == KeyEvent . VK_DOWN ) { e . consume ( ) ; if ( downPressed || ! isEnabled ( ) ) { return ; } downPressed = true ; if ( getTime ( ) == null ) { setTime ( LocalTime . NOON ) ; } zInternalTryChangeTimeByIncrement ( - 1 ) ; decreaseTimer . start ( ) ; } }
keypressed , this is called when a key is pressed inside the text field .
