code: private void textFieldKeyCodeKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldKeyCodeKeyPressed
      if (this.buttonEditKeyCode.isSelected()){
        switch(evt.getKeyCode()){
          case KeyEvent.VK_META:
          case KeyEvent.VK_ALT:
          case KeyEvent.VK_SHIFT:
          case KeyEvent.VK_CONTROL: evt.consume();break;
          default:{
            updateCurrentSelectedForKey(evt);
            this.buttonEditKeyCode.setSelected(false);
            this.tableKeyShortcuts.requestFocus();
          }break;
        }
      }
      evt.consume();
    }
docs: GEN-LAST:event_textFieldKeyCodeFocusLost