• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help me to understand this keystrokes!!  RSS feed

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Could you please help me to understand:
1. What does following means:
menu.setMnemonic(KeyEvent.VK_F);
Does it mean that it is setting Key "F" as hot key with the use of ALT key. Is this "ALT" is fix one? Can I you some other key like "SHIFT" etc. here.
2. I tried the following code it works very well with single key.

menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.SHIFT_MASK));
But How can I use combination of two Keys e.g if I want toassign "Shift+Alt2" as hot key?
regards,
Arun
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!