United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4725203 key on the numpad does not generate any key events on danish/swedish keyboards
JDK-4725203 : key on the numpad does not generate any key events on danish/swedish keyboards

Details
Type:
Bug
Submit Date:
2002-08-02
Status:
Resolved
Updated Date:
2005-06-10
Project Name:
JDK
Resolved Date:
2005-06-10
Component:
client-libs
OS:
solaris_8
Sub-Component:
java.awt
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:
Relates:

Sub Tasks

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
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang


                                     
2004-09-17
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
                                     
2005-06-10



Hardware and Software, Engineered to Work Together