JDK-4382041 : Still problems with keyboard mapping (cf. 106369, 110354)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.2,1.3.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2000-10-23
  • Updated: 2001-03-25
  • Resolved: 2001-03-25
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 Other
1.3.1 betaFixed 1.4.0Fixed
Related Reports
Relates :  
Description

Name: yyT116575			Date: 10/23/2000


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)

Hello,

although keyboard mapping problems were closed with BugID 4240658 I still (or
again?) have such problems when starting an app using Swing (both self-written,
and e.g. forte4j Community edition 1.0.2, build 849) with the new JDK 1.3.0 for
Linux. My concrete system is SuSE Linux 6.3 (kernel 2.2.13), and the problem
shows up irrespective of the VM used (HotSpot, or Classic VM). During start-up I
get messages like

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding
Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding
Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding

and some keys of my 104-keys Cherry keyboard just don't work (e.g., >, # ?, and 
+). Beside that, the apps work as expected.

With JDK 1.2.2 on the same plattform no such problems arise.


Hoping to hear from you,

with best regards


Kurt Spanier
(Review ID: 110501) 
======================================================================

Name: yyT116575			Date: 10/23/2000


java version "1.2.2"
Classic VM (build 1.2.2_006, green threads, javacomp)


Run any java applet using the appletviewer, and get the following warning
messages:

Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding
Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type
VirtualBinding
Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type
VirtualBinding

Source Code:

// Display Fonts
/*
<applet code="ShowFonts" width=550 height=60>
</applet>
*/
import java.applet.*;
import java.awt.*;

public class ShowFonts extends Applet {
  public void paint(Graphics g) {
    String msg = "";
    String FontList[];

    GraphicsEnvironment ge =
      GraphicsEnvironment.getLocalGraphicsEnvironment();
    FontList = ge.getAvailableFontFamilyNames();
    for(int i = 0; i < FontList.length; i++)
      msg += FontList[i] + "\n";

    g.drawString(msg, 4, 16);
  }
}
(Review ID: 110354)
======================================================================

Name: bn120536			Date: 12/15/2000


java version "1.3.0beta_refresh"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta_refresh-b09)
Java HotSpot(TM) Client VM (build 1.3.0beta-b07, mixed mode)

Tilde and hash (on UK keyboard) are not seen as having been typed when running
under JDK1.3 beta refresh (only tested on Linux).
This code works on JDK1.2.2.

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class Tilde {
  private JFrame frame;
  private JTextField urlBar;

  public static void main(String[] args) {
    new Tilde();
  }

  public Tilde() {

    frame = new JFrame("Tilde Test");
    urlBar = new JTextField();
    urlBar.setEditable(true);
    urlBar.addKeyListener(new KeyListener() {
      public void keyPressed(KeyEvent e) {}
      public void keyReleased(KeyEvent e) {}
      public void keyTyped(KeyEvent e) {
        char keyChar;

        keyChar = e.getKeyChar();
        System.out.println("Key typed: " + keyChar);
      }
    });

    frame.getContentPane().add(urlBar);
	
    frame.pack();
    frame.setVisible(true);
  }
}

On 1.2.2 an output of the form:
Key typed: a
Key typed: b
Key typed: c
Key typed: #
Key typed: ~
is seen, and characters appear in JTextField.
On 1.3, we only get output (and characters are similarly missing on JTextField)
of:
Key typed: a
Key typed: b
Key typed: c

Other symbols from shift-number etc. work OK.

No errors or warnings are reported, other than common missing fonts and
colourmap allocations.


(Review ID: 107902)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: ladybird-beta FIXED IN: ladybird-beta INTEGRATED IN: ladybird-beta merlin-beta
14-06-2004

EVALUATION Sounds like the keys on the keyboard are not getting correctly mapped to the VK_KP defines in KeyEvent. scott.violet@eng 2000-10-30 See 4371923, 4381329, 4380071. Should investigate for Ladybird. eric.hawkes@eng 2000-10-30 The Description seems to be describing two separate bugs. This should be broken into two separate reports. eric.hawkes@eng 2000-12-18 The second bug has been decomposed into 4418625. eric.hawkes@eng 2001-02-24 I have emailed the original submitter about not being able to type several keys, and encouraged him to try ladybird-beta. It seems likely that this issue was resolved by the fix for 4371923. I'm not sure what the Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding problem might be; I have never seen this warning with any type of keyboard (US, German), or with any xmodmap. eric.hawkes@eng 2001-02-24 According to the submitter, the problem about hash and tilde in UK keyboards (4418625) has been fixed in Ladybird-beta. eric.hawkes@eng 2001-03-13 I think the warning messages could be an artifact of the submitter's installation of Linux. I haven't seen it on any of our installations. Anyway, the problems with key events don't seem to be related to the warnings. eric.hawkes@eng 2001-03-13 The original submitter tells us that with Ladybird-beta, this problem is gone; all the keys on his keyboard work fine. Since all submitters indicate that their keyboards work correctly with Ladybird-beta, I am closing this bug as fixed in Ladybird-beta (now available on the web). Note: Ladybird will be released (FCS) in a few weeks. However, the original submitter did send us documentation of another problem, which appears unrelated to the keyboard issues. I have opened a new bug about this: 4429852, which I have assigned to the beans team. eric.hawkes@eng 2001-03-24 Warning: Cannot convert string "<Key>InsertChar" to type VirtualBinding Warning: Cannot convert string "<Key>DeleteChar" to type VirtualBinding I did a Google search on VirtualBinding, and came up with some info. Apparently this is a configuration problem common to users of X/motif systems (not specific to Java apps). A lot of people have seen them with Adobe Acrobat, XEmacs, etc. Note: a lot of FAQs suggest that you ignore these warnings. Most people don't see any ill effects, they just find them annoying. Apparently, the first motif app to run installs _MOTIF_DEFAULT_BINDINGS, probably so that the user can change the virtual keybindings across all Motif apps at once. Solution: edit your $HOME/.motifbind file, and add the keysyms that are not in your XKeysymDB file (possibly at /usr/lib/X11/XKeysymDB, or at /usr/openwin/lib/X11/XKeysymDB). I believe the XKeysymDB file contains mappings for vendor-specific keys. Example: osfDelete : <Key>Delete \n\ osfInsert : <Key>Insert Note that the last entry should not be followed by a \n\ Perhaps Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding could be cured with osfCancel : <Key>Escape eric.hawkes@eng 2001-03-25 More info: the VirtualBinding warnings above are probably caused by a bug in motif: 4317815. The fix went into solaris patch 107081-30 (sparc) and 107082-30 (x86). I don't know how this will be addressed for Linux, since I'm not entirely sure how motif is distributed for Linux. eric.hawkes@eng 2001-05-13
13-05-2001