i have to make a menu with a keyboard accelerator key combination of Ctrl+Alt+A. the following line will make a keyboard shortcut of Ctrl+A:
jmiAdd.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
on the menu will be the light blue letters "Ctrl-A" next to the menu entry, plus you can press Ctrl-A at any time to execute the instruction.
by changing CTRL_MASK to ALT_MASK, you change it to "Alt-A".
what i want is to require Ctrl and Alt and A to be pressed simultaneously to execute the instruction. my first guess was CTRL_ALT_MASK, but that didn't work.
i could kluge the code
testing for control and alt pressed at the same time, but i want the proper accelerator note "Ctrl+Alt-A" to show up on the menu beside the menu entry.
have been to several websites on keystroke handling but none talk about combinations.