United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6253172 Some key characters on none US keyboard cannot be typed since JDK 1.4
6253172 : Some key characters on none US keyboard cannot be typed since JDK 1.4

Details
Type:
Bug
Submit Date:
2005-04-11
Status:
Resolved
Updated Date:
2011-01-25
Project Name:
JDK
Resolved Date:
2008-06-11
Component:
client-libs
OS:
linux,solaris_10,windows_xp,windows_2000
Sub-Component:
java.awt
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0,5.0u4,5.0u9,5.0u10,6
Fixed Versions:
7

Related Reports
Backport:
Duplicate:
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
Since JDK 1.4.0 it is not possible to type some French characters - ????????????????????. These are characters AEIOUaeiou with accents (oriented backwards). It is not possible to type these characters in demo/jfc/Notepad, while it works in any non-java Windows application. To write such character you need to change the keyboard to French (Belgium) with layout Belgium (Comma). For ?? press Alt-Gr | and Shift-Q. The | character is the one below backspace key.

I have tested several 1.5.* and 1.4.* JDKs and it doesn't work there. It works ok under JDKs 1.3.1_15-b01 and 1.3.1_05-b02.

For more details see NetBeans issue:
http://www.netbeans.org/issues/show_bug.cgi?id=57628
###@###.### 2005-04-11 11:42:06 GMT
There is a Linux part in this CR: I even not exactly understand what's wrong; "a grave problem" is not reproducible under X Window, XAWT. 

Under Windows 200 it's reproducible with Swing and pure AWT alike.

                                    

Comments
EVALUATION

Bug was introduced with a fix to 4623376,4737679,4501485,4740906,4708221 (4173679/4122715) in awt_Component.cpp. We should apply this fix to navigation keys only thus restoring AltGr functionality.
                                     
2008-04-24
EVALUATION

Under Windows 2000 it's reproducible with Swing and pure AWT alike.
On a Linux part a separate bug filed as they seems unrelated.
                                     
2005-09-28
WORK AROUND

Alt-Gr (in my case right Alt) Shift ['|' '\'] + Shift-Q 

types the expected character
                                     
2005-09-09
EVALUATION

On my keyboard '|' is upper register. The low register for this keyboard key is '\'.
Let me call this keyboard key - ['|' '\']

Alt-Gr (in my case right Alt) Shift ['|' '\'] + Shift-Q 

types the expected character

Alt-Gr ['|' '\'] + Shift-Q 

does not type it

windows applications type ?? in both cases. 

Reassigning  to awt for the investigation.
                                     
2005-09-09
EVALUATION

Could you run this test case?

-- JEP.java (from bugId 5084236)
---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

class JEP {
    
    public static void main(String args[]) {
        JEditorPane pane = new JEditorPane();

        //    pane.enableInputMethods(false);

        JFrame f = new JFrame();
        f.addWindowListener (new WindowAdapter () {
          public void windowClosing (WindowEvent evt) {
            System.exit(0);
          }
        });
    
        f.getContentPane().add(pane);
        f.setSize(500, 500);
        f.setVisible(true);

        // Key listener that debugs the key events
        // being sent to the pane
        pane.addKeyListener(
            new KeyListener() {
                public void keyPressed(KeyEvent e) {
                    debugKeyEvent(e);
                }
                
                public void keyReleased(KeyEvent e) {
                    debugKeyEvent(e);
                }
                
                public void keyTyped(KeyEvent e) {
                    debugKeyEvent(e);
                }
            }
        );

        pane.addMouseListener(
            new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                    debugMouseEvent(e);
                }

                public void mousePressed(MouseEvent e) {
                    debugMouseEvent(e);
                }

                public void mouseReleased(MouseEvent e) {
                    debugMouseEvent(e);
                }
            }
        );
            
        
    }

    private static void debugKeyEvent(KeyEvent e) {
        System.err.println(e);
        System.err.println("--------------------------------------------------------------------------------");
    }

    private static void debugMouseEvent(MouseEvent e) {
        System.err.println(e);
        
        // Append BUTTONx modifiers
        int modifiers = e.getModifiers();
        StringBuffer sb = new StringBuffer();
        if ((modifiers & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) {
            sb.append("BUTTON1_MASK");
        }
        if ((modifiers & InputEvent.BUTTON2_MASK) == InputEvent.BUTTON2_MASK) {
            if (sb.length() > 0) {
                sb.append(" | ");
            }
            sb.append("BUTTON2_MASK");
        }
        if ((modifiers & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) {
            if (sb.length() > 0) {
                sb.append(" | ");
            }
            sb.append("BUTTON3_MASK");
        }
        System.err.println("Button masks: " + sb.toString());
        
        // Append SwingUtilities.isXXXButton() results:
        System.err.println("SwingUtilities.isLeftMouseButton()=" + SwingUtilities.isLeftMouseButton(e));
        System.err.println("SwingUtilities.isMiddleMouseButton()=" + SwingUtilities.isMiddleMouseButton(e));
        System.err.println("SwingUtilities.isRightMouseButton()=" + SwingUtilities.isRightMouseButton(e));
        
        System.err.println("--------------------------------------------------------------------------------");
    }
    
}
---------- END SOURCE ----------

If the problem is reproducible can I have the debug output?
                                     
2005-08-29



Hardware and Software, Engineered to Work Together