void (final KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { e.consume(); filter(); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(myPackages, true)); } else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { onEscape(e); } }