Duplicate :
|
FULL PRODUCT VERSION : java version 1.6.0_06 Java SE Runtime Environment (build 1.6.0_06-b02) ADDITIONAL OS VERSION INFORMATION : Linux 2.6.24-16 generic (Ubuntu 8.04 Hardy Heron) A DESCRIPTION OF THE PROBLEM : java version 1.6.0_06: In Java applications, "Alt Gr" and therefore third level keys don't work. Ctrl+Alt+<key> doesn't work either. This means I cannot write e.g. "\", "{", "}", "[", "]", "~" ... The problem doesn't seem to be new, but - on my computer - did not occur in java version 1.6.0_03. All in all, I get this problem since I updated ubuntu from 7.10 to 8.04 and with this from java 6 update 3 to update 6. I do not have any troubles with "alt gr" on Windows operating systems as well. Keyboard is German. The key description you get with KeyEvent.getKeyText(int)-method on "alt gr"-key press is: "Unknown keyCode: 0x0" STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Get a German keyboard (or probably any other European). 2. Install jdk1.6.0_06. 3. Create any application that contains a text input component (e.g. java.awt.TextField) 4. Try to write e.g. "\" by pressing <alt gr>+? -- this should not work ... REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- package test; import java.awt.*; import java.awt.event.*; public class Main extends java.awt.Frame { private TextField textField = new TextField(); public Main() { addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); setSize(200, 80); add(textField); } public static void main(String[] args) { new Main().setVisible(true); } } ---------- END SOURCE ---------- Release Regression From : 6u3 The above release value was the last known release where this bug was not reproducible. Since then there has been a regression.