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

ActionEvent's modifiers not working consistantly across toolkits for TextField

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      I have a frame with a TextField and I have added an action listener to the text field. On pressing 'ENTER' with multiple modifiers, I am noticing the following behaviors -

      Motif -
      Pressing CTRL+ENTER triggers ActionEvent with ctrl modifier.
      Shift/Alt + Enter - no action

      Win32 -
      Pressing SHIFT+ENTER triggers ActionEvent with shift modifier.
      CTRL/ALT + ENTER - no action

      XToolkit -
      ActionEvent is not triggered when SHIFT or CTRL or ALT key is down.

      Also on the above toolkits, keeping left button down and pressing ENTER triggers ActionEvent with button1 mask where as modifiers field is empty for other mouse buttons.

      Not sure what is the correct behavior and motif seems to differ from XToolkit. This may be considered as a regression.

      Run the attached test and try pressing ENTER in the text field with SHIFT/CTRL/ALT and the 3 mouse buttons.

      Attachments

        Activity

          People

            volk Konstantin Voloshin (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: