JDK-4850149 : Dead keys not working for Belgian keyboard
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: linux
  • CPU: x86
  • Submitted: 2003-04-17
  • Updated: 2006-08-07
  • Resolved: 2006-08-07
Related Reports
Relates :  
Description
Name: rmT116609			Date: 04/17/2003


FULL PRODUCT VERSION :
java -version ==>
    java version "1.4.2-beta"
    Java(TM) Runtime Environment. Standard Edition (build 1.4.2-beta-b19)
    Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
java -version ==>
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)


FULL OS VERSION :
Linux 2.4.20 architecture i686
Linux 2.4.5 architecture i686

EXTRA RELEVANT SYSTEM CONFIGURATION :
Xfree86 4.3.0
Xfree86 4.1.0

xkb configuration

Generic 102-key (Intl) PC
Keyborad Layout = be


A DESCRIPTION OF THE PROBLEM :
Dead keys are not working for the Belgian keyboard, other X applications have no problem, only java applications.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try the following program

import javax.swing.*;
import java.awt.event.*;
public class Test implements KeyListener
{
    public static void main(String[] args)
    {
        JFrame frm=new JFrame();
        JTextField lbl=new JTextField("Hello");
        lbl.addKeyListener(new Test());
        frm.getContentPane().add(lbl);
        frm.setVisible(true);
    }
    public void keyPressed(KeyEvent e)
    {
        System.out.println("Key pressed, keycode="+e.getKeyCode()+" modifiers="+e.getModifiers());
    }
    public void keyReleased(KeyEvent e)
    {
        System.out.println("Key released, keycode="+e.getKeyCode()+" modifiers="+e.getModifiers());
    }
    public void keyTyped(KeyEvent e)
    {
        System.out.println("Key typed, keycode="+e.getKeyCode()+" modifiers="+e.getModifiers());
        System.out.println("Key char "+e.getKeyChar());
    }
    
}

EXPECTED VERSUS ACTUAL BEHAVIOR :
When you press 'Alt Gr' together with the ~ and then the space bar the key typed event should print 'Key char ~'.
When you press '^' followed by a, the key typed event should print 'key char a' (the a should be a a with a ^ on top of it).
Essentially none of the dead keys that I tried seems to work.

Not that I did not mention the output of the keyPressed and KeyReleased output.
First test

Pressing 'Alt Gr' together with ~ gives
  Key released, keycode=61 modifiers=0
Pressing space gives
  Key released, keycode=32 modifiers=0

There is no key typed event

Second test

Pressing '^' gives
  Key released, keycode=130 modifiers=0
Pressing 'a' gives
  Key typed, keycode=0 modifiers=0
  Key char ?
  Key released, keycode=65 modifiers=0

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.*;
public class Test implements KeyListener
{
    public static void main(String[] args)
    {
        JFrame frm=new JFrame();
        JTextField lbl=new JTextField("Hello");
        lbl.addKeyListener(new Test());
        frm.getContentPane().add(lbl);
        frm.setVisible(true);
    }
    public void keyPressed(KeyEvent e)
    {
        System.out.println("Key pressed, keycode="+e.getKeyCode()+" modifiers="+e.getModifiers());
    }
    public void keyReleased(KeyEvent e)
    {
        System.out.println("Key released, keycode="+e.getKeyCode()+" modifiers="+e.getModifiers());
    }
    public void keyTyped(KeyEvent e)
    {
        System.out.println("Key typed, keycode="+e.getKeyCode()+" modifiers="+e.getModifiers());
        System.out.println("Key char "+e.getKeyChar());
    }
    
}
---------- END SOURCE ----------

(Review ID: 183558) 
======================================================================

Comments
EVALUATION Apparently this bug was fixed under 4360364 umbrella. Not reproducible any more in mustang neither in pure "be" layout nor in "us,be" pair.
07-08-2006

EVALUATION Sounds like two separate problems. The one involving the space bar has several open reports. The other one may be new - or it may be that the output receptacle (e.g. the submitter's terminal window) can't handle the accented character. It would be better to cast the char to an int to see what value is reported. ###@###.### 2003-04-17
17-04-2003