-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.0.2
-
sparc
-
solaris_2.5.1
With certain menu configurations, alt-key navigation does not work consistently or easily.
In the current implementation, hitting the Alt key by itself causes the first menu to expand. The submenu then receives subsequent key strokes before the main menu bar. If a submenu item pre-empts the key mapping for one of the other main menu items you can't navigate to that other menu.
For example, consider the following menu hierarchy:
(F)ile
(O)pen
(C)lose
...
(O)utline
Move topic up
...
(W)indow
Arrange
...
This menu structure has the following properties:
- Alt-F will open the "File" menu
- Alt-W will open the "Window" menu
- Alt-O will trigger the File->Open command!
To be consistent, Alt-somekey should always open the top level menu corresponding to that key. Only once the menu is open, should the submenu options be available. (As an aside, notice that if the "Window" menu is expanded, typing 'F' will take you back to the "File" menu, which may or may not be a good thing.)
On Windows clicking the Alt key alone highlights the first menu item but does not expand it, thus allowing subsequent keys to specify which top level menu should be opened so that either <Alt> followed by 'O' or Alt-O would open the "Outline" menu. With the current set up in Swing, the top level menu specification is preempted.
In the current implementation, hitting the Alt key by itself causes the first menu to expand. The submenu then receives subsequent key strokes before the main menu bar. If a submenu item pre-empts the key mapping for one of the other main menu items you can't navigate to that other menu.
For example, consider the following menu hierarchy:
(F)ile
(O)pen
(C)lose
...
(O)utline
Move topic up
...
(W)indow
Arrange
...
This menu structure has the following properties:
- Alt-F will open the "File" menu
- Alt-W will open the "Window" menu
- Alt-O will trigger the File->Open command!
To be consistent, Alt-somekey should always open the top level menu corresponding to that key. Only once the menu is open, should the submenu options be available. (As an aside, notice that if the "Window" menu is expanded, typing 'F' will take you back to the "File" menu, which may or may not be a good thing.)
On Windows clicking the Alt key alone highlights the first menu item but does not expand it, thus allowing subsequent keys to specify which top level menu should be opened so that either <Alt> followed by 'O' or Alt-O would open the "Outline" menu. With the current set up in Swing, the top level menu specification is preempted.
- duplicates
-
JDK-4140657 ALT-mnemonic not working for JMenu when menu and submenu have the same mnemonic
-
- Closed
-