boolean (KeyEvent e) { @SuppressWarnings("deprecation") KeyStroke stroke = KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers()); Object action = ((InputMap)UIManager.get("ComboBox.ancestorInputMap")).get(stroke); if ("selectNext".equals(action)) { if (!isPopupShowing()) { return true; } else { return false; } } else if ("togglePopup".equals(action)) { if (isPopupShowing()) { closePopup(); } else { suggestCompletion(true, true); } return true; } else { KeymapManager manager = KeymapManager.getInstance(); if (manager != null) { Keymap active = manager.getActiveKeymap(); for (String id : active.getActionIds(stroke)) { if (ACTION_CODE_COMPLETION.equals(id)) { suggestCompletion(true, true); } } } } return false; }