JDK-4960727 : xkb (X Keyboard Extension) support should be fixed in XAWT.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,linux_redhat_9.0
  • CPU: x86
  • Submitted: 2003-11-27
  • Updated: 2005-06-17
  • Resolved: 2005-06-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.
JDK 6
6 b40Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Name: ynR10250			Date: 11/27/2003

On the system with Gnome & xkb, use any layout with non-latin
       additional group of symbols (for instance, Russian). There's
       an example of InputDevice section in XFree86 config file:
            Section "InputDevice"   
               Identifier  "Keyboard0"
               Driver      "keyboard"
               Option      "XkbRules" "xfree86"
               Option      "XkbModel" "pc105"
               Option      "XkbLayout" "us,ru"
               Option      "XkbOptions" "grp:shift_toggle"
            EndSection

    The same layout, at least in theory, may be created at runtime
    by calling 
       setxkbmap -layout "us,ru" -option "grp:shift_toggle"  -rules xfree86 -model pc105
    Switch between groups by pressing left then right Shift.   
    
    Compile and run a simplest test:
    
    import java.awt.*;
    public class AcTest {
        static Frame frame = null;
        static TextField tf = null;
        public static void main( String args [] ) {
            frame = new Frame("Input test");
            tf = new TextField();
            frame.add( tf);
            frame.setSize(200,80);
            frame.setLocation(300,300);
            frame.setVisible( true );
        }
    }
    
    Switch to Russian, select text field and type 'q': 
    there must be 0x0439 character added but will be no input at all.
    Also, no events generated.

    
======================================================================

Comments
EVALUATION Name: ynR10250 Date: 12/01/2003 it looks like xkb-based localization never worked neither in 1.4.2 nor with motif toolkit in 1.5.0b29. Installing Gnome+xkb on Solaris, we get (in XAWT) Arabic right-to-left output instead of Russian which is only slightly better than nothing. To fix, we need to map most keysyms>256 to correct Unicode characters. It may be not altogether easy, so I suggest commiting the fix to dragonfly. ###@###.### ====================================================================== Name: dmR10075 Date: 12/23/2003 To map keysym to unicode characters we can use XwcLookupString. It returns string consisting of characters, in a simple case it will be exactly one character of input we need. How we can't get AWT key code so easily. The question is - do we need to get it? If I press russian letter 'A' which AWT key code should I get in KEY_PRESSED? We probably can perform complex lookup since the map AWT keycode <-> X11 key sym is only for Latin-1 character+some additional characters. We can probably ask for keyboard mapping for different mapping planes, find one which contains keysym for the current keycode which maps into AWT key code and return that AWT key code. ###@###.### 2003-12-23 ====================================================================== Name: dmR10075 Date: 12/24/2003 I investigated XKB and found no way to get first Latin-1 plane of the keyboard if the input is currently on another plane(group <-> plane). It seems like, since XKB limits group count to 4, Gnome decides to not use XKB groups but rather reinstall 1st group with different maps when switch happens. In my configuration, there is always only one group and it is the current group. So, for non-Latin-1 groups, we will always get AWT keycode 0 because we are unable to map local-specific keysym into Latin-1. Possible fix might be to bring ALL keysyms into Java API(as constants, into KeyEvent, in addition to Latin-1 and some special keysyms). ###@###.### 2003-12-24 ====================================================================== After fix to 4360364, XAWT version should work properly with XKB in Mustang, on both Linux and Solaris. Note that Solaris may be shipped with Xorg which doesn't work without XKB. ###@###.### 2005-05-25 09:56:02 GMT
25-05-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
17-09-2004