void (JComponent component) { @NlsSafe String actionName = "FCB_PAGE_UP"; Action action = new AbstractAction(actionName) { private static final long serialVersionUID = 6590487133211390977L; @Override public void actionPerformed(ActionEvent e) { // without moving the focus, move up one page on the popup menu, // probably jumping to history list if (popup.isVisible()) { boolean focusPopup = popup.isPopupFocused(); popup.selectUpPage(); popup.setPopupFocused(focusPopup); } } }; component.getActionMap().put(actionName, action); component.getInputMap(JComponent.WHEN_FOCUSED) .put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), actionName); }