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

A few problems with dead keys in Swing text components

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      Name: jk109818 Date: 12/22/2002


      FULL PRODUCT VERSION :
      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)


      FULL OPERATING SYSTEM VERSION :
      Mandrake Linux release 8.2 (Bluebird) for i586
      Linux Kernel version 2.4.18, release 6mdk
      glibc version 2.2.4, release 25mdk

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      german keymap using dead keys

      A DESCRIPTION OF THE PROBLEM :
      In Swing text components under any Linux system with a
      keymap using dead keys, the characters which are composed by
      pressing a dead key and e.g. space (on a German keyboard
      characters like ~,`,',ß,M-^@, etc.) cannot be entered.

      This problem does not occur in AWT text components.

      This problem is around since at least 1.3.0 and has already
      been reported (cf. Bug #4379138). Bug #4379138 is reported
      to be fixed, *which it is not*. See the user comments to
      #4379138 (last comment from 11/23/2002).

      The problem was not there in J2SDK 1.2.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. select a keymap using dead keys
      2. run the supplied Java program (see below) or run any Java
      program with Swing text components
      3. try to enter a 'composed' character by pressing a dead
      key followed by ENTER

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      expected: the composed character should appear
      actual: it doesn't

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      no messages

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.*;
      import javax.swing.*;

      public class TestDeadKeys
      {
      public static void main(String[] args)
      {
      JFrame jframe = new JFrame("Swing Frame");
      Container pane = jframe.getContentPane();
      pane.setLayout(new FlowLayout());
      pane.add(new JLabel("please enter dead-keys (e.g., '~')"));
      pane.add(new JTextField(20));
      jframe.pack();
      jframe.setVisible(true);
      }
      }

      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      - run J2SDK 1.2

      - do not enter such characters (which is not a solution at
      all: I use jEdit, an editor written in Java; not being able
      to enter "~" is a real drawback for e.g. Perl programming).

      - use a keymap without dead keys (not a good solution as
      well, since characters as "ß" could not be entered anymore)
      (Review ID: 178589)
      ======================================================================

      Name: jk109818 Date: 12/22/2002


      FULL PRODUCT VERSION :
      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

      Also Java 1.3.

      FULL OPERATING SYSTEM VERSION :
      Mandrake 9, Intel

      ADDITIONAL OPERATING SYSTEMS :
      all Linux platforms


      A DESCRIPTION OF THE PROBLEM :
      Using dead keys in X Windows, certain characters, such as
      apostrophe and tilde cannot be typed into a Swing widget
      (probably AWT, as well). The problem is well documented in
      bug 4379138. That bug has been closed as fixed, but
      erroneously, as many comments on that bug will confirm. The
      bug should either be reopened or a new one should be opened.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Open an app or applet with a JTextField.
      2. Activate dead keys with xmodmap or with
         a KDE keyboard configuration.
      3. Type "alt apostraphe a" -> ß appears.
         Type "alt apostrophe apostrophe" -> nothing appears.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      On typing "alt apostrophe apostrophe", nothing appears. In
      all non-Java apps an apostrophe appears.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER WORKAROUND :
      There is no work around. It is impossible for me to utilize
      a Java app for any language using non-ASCII characters,
      between important punctuation marks and symbols become
      untypable.
      (Review ID: 179307)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yan Yuri Nesterenko
              Reporter:
              jkimsunw Jeffrey Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: