Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4097435

JFC should provide independent notions of menu shortcuts and hot keys

    XMLWordPrintable

Details

    • swing0.8
    • generic
    • solaris_2.6
    • Verified

    Description

      JFC 0.5 classes provide a mechanism that allow the programmers to specify a menu shortcut. This part works well. Pressing a Alt-<menu shortcut> pops a menu.

      The problem/bug is that menuitem shortcuts do not works. Using registerKeyboardActions() one can associate a global hotkey that will cause an action.

      However, a menu short cut (at least in Motif) should allow the user to press a single letter (specified as the short cut of the menu item) and cause an action.
      This functionality is missing (or is buggy).

      In Solaris/CDE and using dtterm as an example:

      Alt-W pops down a Window menu.
      Pressing N (menu short cut for New) causes a New Window action.

      This is an essential functionality for shipping JFC-based products that replaces use of Motif.

      [gelf 12/5/97]

      Menu shortcuts and global menu hotkeys should be independent and follow
      the general CUA conventions. A better example would be dtterm's Edit menu.
      Edit menu has a shortcut Alt-E (E is underlined) and contains two
      items - Copy and Paste. Copy has a shortcut 'C' (C is underlined) and
      Paste has a shortcut 'P' (P is underlined). Copy's hotkey is Ctrl-Insert
      and Paste's hotkey is Shift-Insert. Hotkeys and shortcuts have different
      scope and they act differently. When a user presses Alt-E, the Edit
      menu is displayed and the user have access to menu shortcuts 'C' and 'P'
      which were not active before. So to copy a selected text into a clipboard
      one can press Alt-E and C. Hotkeys, on the other hand, are always active
      and when one uses a hotkey the appropriate action is executed without
      displaying a menu. Menuitems should support both. Menu shortcuts
      should be underlined. Menu labels whould be formatted in such a way
      so that all hotkeys of a submenu are left-aligned (bugid: 4096574)

      Attachments

        Issue Links

          Activity

            People

              gsaab Georges Saab
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: