JDK-4725203 : key on the numpad does not generate any key events on danish/swedish keyboards
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: x86
  • Submitted: 2002-08-02
  • Updated: 2005-06-10
  • Resolved: 2005-06-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b40Fixed
Related Reports
Relates :  
Relates :  
Description
Keywords
java, solaris, jdk, keycode, keyevent, numpad, numlock,
keypressed danish keyboard, swedish keyboard 

Product java/solaris/classes_awt DANISH / SWEDISH KEYBOARD!!!!!!!!!!!!!!!!!!!!!!

On Solaris, the decimal point key on the numpad (KeyChar=,
KeyCode=110 KeyText=NUM .)
does not generate any key
events(KeyPressed/KeyReleased/KeyTyped).
Note that the "," character is actually displayed in the
text field
despite the fact that no event has been generated!

This has been verified on Solaris Sparc and Solaris Intel
with all available versions of jdk 1.1.x, jdk 1.2.x
on DANISH/SWEDISH keyboards.

Here is the sample code to reproduce the problem:

The file Key.html:
---------------------------------- Cut Here
----------------------------------
<html>
<head>
<title>The NumPad Test Applet</title>
</head>
<body>
<p>
<applet code="Key.class" width=500 height=300>
</applet>
</body>
</html>
---------------------------------- Cut Here
----------------------------------

The file Key.java:
---------------------------------- Cut Here
----------------------------------
import java.applet.*;
import java.lang.*;
import java.awt.*;
import java.awt.event.*;

public class Key extends Applet {
        private TextField tf;

        public void init() {
                this.setLayout(new
FlowLayout(FlowLayout.CENTER, 30, 30));

                tf = new TextField("ABCD",20);
                this.add(tf);

                tf.addKeyListener(
			new KeyListener() {
         			public void keyTyped(KeyEvent e) {
					System.out.print(  "KeyTyped: ");
				   	printKeyInfo(e);
					}
        			public void keyReleased(KeyEvent e) {
					System.out.print(  "KeyReleased: ");
				    	printKeyInfo(e);
					System.out.println("----------------");
        			}
       				public void keyPressed(KeyEvent e) {
					System.out.print(  "KeyPressed: ");
					printKeyInfo(e);
					}
        			} );
                tf.addActionListener(
            		new ActionListener() {
                		public void actionPerformed( ActionEvent e
) {
                    		System.out.println( e );
                		}
            		} );
        }


        public void printKeyInfo(KeyEvent e) {
			System.out.print(  "KeyChar="  + e.getKeyChar());
			System.out.print(  " KeyCode=" + e.getKeyCode() );
			System.out.println(" KeyText=" +
e.getKeyText(e.getKeyCode()));
	}
}
---------------------------------- Cut Here
----------------------------------

Comments
EVALUATION Escalation for Tiger might be opened for this bug. Should address it in Mustang as soon as possible. ###@###.### 2004-06-21 Cannot reproduce any more after 4360364 with Type 5 Danish keyboard and Danish locale. Should be tested with Type 6 Danish keyboard though: I don't have one. My opinion, the issue was in some keysym adjustment code which is now gone so I'll mark this bug as fixed anyway. ###@###.### 2005-06-10 09:46:00 GMT
10-06-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
17-09-2004