Originally Posted by
amitection
But the issue with Find.setMnemonic(KeyEvent.VK_F); was that it was working only with ALT. I wanted the key to work with CNTRL. Thats it.
Setting the mnemonic and setting the accelerator are two different things, and my post alluded to setting the accelerator:
myMenuItem.setAccelerator(KeyStroke.getKeyStroke(K eyEvent.VK_F, InputEvent.CTRL_MASK));
And the API for setAccelerator:
Sets the key combination which invokes the menu item's action listeners without navigating the menu hierarchy.