List of usage examples for javax.swing JComboBox getInputMap
public final InputMap getInputMap(int condition)
InputMap
that is used during condition
. From source file:Main.java
public Main() { JComboBox cpmbo = new JComboBox(); cpmbo.addItem("One"); cpmbo.addItem("Two"); cpmbo.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK), "spacePopup"); this.add(cpmbo); }