Java tutorial
import java.awt.event.KeyEvent; import javax.swing.JMenuItem; import javax.swing.KeyStroke; public class Main { public static void main(String[] argv) throws Exception { JMenuItem item = new JMenuItem("Item"); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, KeyEvent.SHIFT_MASK)); } }