JDK-4978105 : Applets in Plugin on Windows can't see dead keys as KeyEvents.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2_03
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-01-14
  • Updated: 2004-03-30
  • Resolved: 2004-03-08
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.
Other
1.4.2_05 05Fixed
Description
An applet which creates a KeyListener wants to look at the low-level KeyPress events which are happening.  

On Windows, in the Java PlugIn, while a TextField can display characters entered using a dead-key, the KeyListener sees no event for the dead key itself.

Using the built-in JVM (ie. not Sun's), the dead key does generate it's own event.  The dead key also generates an event which the KeyListener sees if the applet is run in AppletViewer rather than in the Java Plugin. 

We expect to see these events as we believe we are using the low-level interface to monitor actual keys pressed, not characters typed.

On Solaris, the compose key does generate a KeyEvent.

To reproduce:

An applet for monitoring this behaviour is attached.

If using an English PC with an English keyboard, use Windows' control panel to add a Spanish keyboard in Windows.  This means the key after jkl; and before # and <enter> becomes the DEAD ACUTE key, and the key to the right of u i o p becomes the DEAD GRAVE.

Load the attached web page (in the tar file) into a browser, and give focus to the first text entry field.  Press either of these keys and note that the test applet does not recognise it.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_05 generic tiger-beta2 FIXED IN: 1.4.2_05 tiger-beta2 INTEGRATED IN: 1.4.2_05 tiger-b42 tiger-beta2
14-06-2004

EVALUATION Name: ssR10077 Date: 02/19/2004 All the code workarounding the so called TranslateMessage bug with dead keys can be safely removed. The true problem is we always pass scancode of the pressed button to ::ToAsciiEx and confuse Win32 to think additional Dead Key pressed. If we pass the correct scan code the things work right without additional thinkering. ======================================================================
11-06-2004

PUBLIC COMMENTS An applet which creates a KeyListener wants to look at the low-level KeyPress events which are happening. On Windows, in the Java PlugIn, while a TextField can display characters entered using a dead-key, the KeyListener sees no event for the dead key itself.
10-06-2004