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

no way to use function keys as menu shortcuts

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.1, 1.1.4, 1.1.5
    • client-libs
    • Fix Understood
    • x86, sparc
    • solaris_2.6, windows_nt



      Name: rm29839 Date: 10/28/97


      There's no way to use a plain function key (e.g.,
      the F5 key) as a menu shortcut. The API insists
      on adding CTRL (or Command, or whatever modifier)
      to all shortcuts. This makes sense for alphabetic
      shortcuts, but not for function keys. People
      should be able to use F5 as a shortcut for one
      thing and CTRL-F5 as a shortcut for another thing
      and SHIFT-F5 as a shortcut for a third thing.
      company - Netbot Inc. , email - ###@###.###
      ======================================================================


      Name: diC59631 Date: 1997-11-04

      Here is another....

      The code belkow attempts to assign F3 as a menu shortcut. However, dropping down the menu shows the shortcut as "Ctrl-R"!

      This refers to my earlier bug report, rejected ...

      newsGroupID : 16522
      bugtraqID : 0
      dateCreated : 1997-09-24 14:46:00.0
      dateEvaluated : 1900-01-01 00:00:00.0
      delReason : Unclear Request
      synopsis : Cannot use function keys in a MenuShortcut
      reviewerID : rm29839

      ------------code ----------------
      import java.awt.*;
      import java.awt.event.*;

      public class test extends Frame {
        public test () {
          MenuBar menubar = new MenuBar();
          Menu menu = new Menu("File");

          menu.add(new MenuItem("Exit", new MenuShortcut(KeyEvent.VK_F3)));
          menubar.add(menu);
          setMenuBar(menubar);
          setBounds(0, 0, 200, 200);
          show();
        }

        public static void main(String args[]) {
          new test();
        }

      }

      ========================================================================

            Unassigned Unassigned
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: