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

missing or improper keyPressed KeyEvent handling

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5.1, solaris_7

      Description



      Name: nl37777 Date: 10/29/98


      /* the following code demonstrates that java 1.x
       * under sparc has been messed up.
       * previously, shift-A generated NO EVENT!
       * now, with 1.2RC1, it just generates a WRONG
       * event!
       */
      import java.awt.Frame;
      import java.awt.event.*;

      class key extends Frame implements KeyListener {
              void printevt(KeyEvent evt, String name){
                      int keycode=evt.getKeyCode();
                      System.out.print(name+" keycode "+keycode);
                      System.out.print(" keychar "+evt.getKeyChar());
                      System.out.println(" keytext "+evt.getKeyText(keycode));
              }
              public void keyPressed(KeyEvent evt){
                      printevt(evt,"keyPRESSED");
              }
              public void keyReleased(KeyEvent evt){
                      printevt(evt,"keyPRESSED");
              }
              public void keyTyped(KeyEvent evt){}

              public static void main(String args[]){
                      key me = new key();
                      me.setSize(300,300);
                      me.addKeyListener(me);
                      me.setVisible(true);
              }
      }


       --------------------------------------------
      for some reason, control+a works okay, but
      shift+a does not. shift+a generates keycode **0**
      In jdk1.1.X, there isn't even an event generated.

      Note that this INCLUDES jdk1.1.7!!

      The ms-windows version runs the code correctly.
      (Review ID: 41471)
      ======================================================================

      Name: tb29552 Date: 04/15/99


      bugID 4185844 needs to be updated, to show that the bug is
      present for jdk1.2.1 under solaris.

      ADDITIONALLY, I was told a few days ago (last week?) that
      it would be updated to show it is still a bug under
      jdk1.1.8.

      It has not been updated.
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            naoto Naoto Sato
            Reporter:
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: