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

[SwingNode] getKeyLocation not correctly implemented with JavaFX

    XMLWordPrintable

Details

    Description

      Awt offered a getKeyLocation() as a member of java.awt.event.KeyEvent.

      When an awt component is added to a JavaFX Parent, this method is incorrectly implemented and always returns KEY_LOCATION_UNKNOWN (tested in a java.awt.event.KeyListener on JTextField, JLabel, ...).

      Moreover, this method should be provided in native JavaFX key events, for key listeners to determine exactly which key is pressed. What makes it worse is the javafx.scene.input.KeyEvent::getCode method returns UNDEFINED for several keys, and applications have to check a combination of getCode, getText, in order to determine only inaccurate data on the pressed key.

      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Imported: