Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multi-Key Accelerator  RSS feed

 
Efrat Bar-Nahum
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to assign a multi keyboard accelerator to a JMenuItem.
(I want that the shortcut will be something like: Ctrl+P,M).

How can I do it?

Thanks,
Efrat
[ August 22, 2006: Message edited by: Efrat Bar-Nahum ]
 
Thorsten Klonk
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a menu like the following one:

MenuBar
|--File
| |
| |-Open
| |-Save
| |-Close
|
|--Preferences
| |
| |-Menu

...

And you would like to have an quick access to Preferences -> Menu?

So, your menu would look like this:



Now if you will press |Ctrl| + |P| you will open the FileMenu.
If you press |Ctrl| + |O| you will call the OpenMenuItem (when first pressed |Ctrl| + |P|)

In other words:

To fast access File --> Open
you will have to hold down |Ctrl| and then press |F|, then |O|.

I hope I understood your question correctly

Greetings,
Thorsten
 
Thorsten Klonk
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for "Multi-Posting"
[ August 28, 2006: Message edited by: Thorsten Klonk ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!