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

Java doesn't send proper events for composed chars (like รก)

XMLWordPrintable

      When I type into a textfield the sequence Compose then ' then a, it puts the
      text "á" into the field, which is good. Unfortunately the events it sends to
      the component are not as good:

      java.awt.event.KeyEvent[KEY_PRESSED,keyCode=192,keyChar='`'] on textfield0
      java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyChar='`'] on textfield0
      java.awt.event.KeyEvent[KEY_RELEASED,keyCode=192,keyChar='`'] on textfield0
      java.awt.event.KeyEvent[KEY_PRESSED,keyCode=65,keyChar='a'] on textfield0
      java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyChar='a'] on textfield0
      java.awt.event.TextEvent[TEXT_VALUE_CHANGED] on textfield0
      java.awt.event.KeyEvent[KEY_RELEASED,keyCode=65,keyChar='a'] on textfield0

      Note that nothing is delived to correspond to the Compose key, and no event
      makes mention of the char value "á".

      The implications of this lack of event creation are that lightweights cannot
      handle these extended characters, because they have no way of differentiating
      "'a'e~n" from "áéñ".

      Try composed characters in the JFC!

            nlindenbsunw Norbert Lindenberg (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: