JDK-4218892 : Unable to enter '!' and '=A7' characters into AWT via the french =
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_95,windows_nt
  • CPU: x86
  • Submitted: 1999-03-10
  • Updated: 1999-04-07
  • Resolved: 1999-04-07
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.2.2 1.2.2Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description

Name: clC74495			Date: 03/10/99

=20
Carlos.Lucasius@Canada (March 10, 1999): See also bug 4201056
(it only mentions problems with '!', not with '=A7' ).

Original bug report follows:


This problem appears under Windows98 and WindowsNT 4.0
There was not such a problem under JDK1.1.x

//Description: Using the Fr. keyboard driver (MS Win), exclamation '!' (and
//  also section sign '=A7') appear as question mark '?' in AWT comp's. (17=
722)
//Steps:  1) Install Fr keybd driver (on WinNT:  Settings; Control Panel;
//  <Input Locales>; <Add>; French(Standard); <OK>; "Enable Indicator on
//  Taskbar" =3D=3D true; <OK>)
//  2) Run this app. (JDK 1.2 -V)
//  3) Switch to Fr keybd (the 'q' and 'a' have changed positions from En k=
eybd)
//  4) type '!' on Fr keybd (this is right-most key of the bottom
//  row -- _next_ to the right shift key)
//  exp: to see '!' displayed
//  act: '?' gets displayed
//  5) type same key as step 4, plus the Shift key
//  exp: to see '=A7' displayed (Section sign)
//  act: '?' gets displayed

//package jdkFrKeyBd;

import java.awt.*;
import java.awt.event.*;

public class Frame1 extends Frame {
  TextField textField1 =3D new TextField();
  Label label1 =3D new Label();
  TextArea textArea1 =3D new TextArea();

  public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try  {
      jbInit();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }

//Overriden so we can exit on System Close
  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() =3D=3D WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }

  private void jbInit() throws Exception {
    this.setSize(new Dimension(300, 300));
    this.setTitle("Fr keybd, Exclam. mark");
    textField1.setText("textField1");
    label1.setFont(new Font("Dialog", 1, 12));
    label1.setText("Using Fr. Keybd, unable to enter \'!\' (appears as \'?\=
')");
    textArea1.setText("textArea1");
    this.add(textField1, BorderLayout.CENTER);
    this.add(textArea1, BorderLayout.SOUTH);
    this.add(label1, BorderLayout.NORTH);
  }

  public static void main(String[] args) {
    Frame1 frame11 =3D new Frame1();
    frame11.setVisible( true);
  }

}
(Review ID: 55280)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.2.2 INTEGRATED IN: 1.2.2
14-06-2004

SUGGESTED FIX Here are the diffs for this fix. svdiffs 1.212 1.213 awt_Component.cpp 1621c1621 < {java_awt_event_KeyEvent_CHAR_UNDEFINED, 0} --- > {java_awt_event_KeyEvent_VK_UNDEFINED, 0} 1735a1736,1741 > // Windows treats AltGr as Ctrl+Alt > if (modifiers & java_awt_event_InputEvent_ALT_GRAPH_MASK) { > altIsDown = TRUE; > ctrlIsDown = TRUE; > } > 3711c3717 < * Method: handleEvent --- > * Method: nativeHandleEvent 3771a3778,3780 > /* Check to see whether the keyCode or modifiers were changed > on the keyPressed event, and tweak the following keyTyped > event (if any) accodingly. */ 3774a3784,3785 > UINT winKey = pMsg->wParam; > bCharChanged = FALSE; 3776,3778c3787,3789 < if (pMsg->wParam == VK_PROCESSKEY) < { < bCharChanged = FALSE; --- > if (winKey == VK_PROCESSKEY) { > // Leave it up to IME > break; 3780,3786c3791,3796 < else < { < UINT key, keyModifiers; < p->JavaKeyToWindowsKey(keyCode, &key, &keyModifiers); < if (!key) < { < key = keyCode; --- > > if (keyCode != java_awt_event_KeyEvent_VK_UNDEFINED) { > UINT newWinKey, ignored; > p->JavaKeyToWindowsKey(keyCode, &newWinKey, &ignored); > if (newWinKey != 0) { > winKey = newWinKey; 3788,3789d3797 < modifiedChar = p->WindowsKeyToJavaChar(key, modifiers); < bCharChanged = (keyChar != modifiedChar); 3790a3799,3802 > > modifiedChar = p->WindowsKeyToJavaChar(winKey, modifiers); > bCharChanged = (keyChar != modifiedChar); > break; 3791a3804 > break; // not reached 3793d3805 < break; 3797a3810 > 3817c3830,3831 < break; --- > break; // not reached >
11-06-2004

EVALUATION Fixed with 4191924. david.mendenhall@eng 1999-04-05 Test case is at /test/java/awt/event/KeyEvent/ExtendedKeysTest eric.hawkes@eng 1999-04-07
05-04-1999