SUGGESTED FIX
Name: ynR10250 Date: 06/16/2004
In addition to a change described in evaluation, we should mask high order bit by another
ugly patch:
*** 885,890 ****
--- 887,893 ----
case XK_Linefeed:
case XK_Escape:
case XK_Delete:
+ case XK_KP_Separator:
/* Strip off highorder bits defined in xkeysymdef.h
* I think doing this converts them to values that
* we can cast to jchars and use as java keychars.
That would be partial fix for this particular problem.
###@###.###
======================================================================
|
EVALUATION
Name: ynR10250 Date: 04/21/2004
True, there is hardcoded keysym substitute in the native code.
To remedy it, we could for instance do something like this (for XAWT):
-------src/solaris/native/sun/xawt/XWindow.c -------
*** /tmp/sccs.fnZQLN 2004-04-21 16:20:26.000000000 +0400
--- XWindow.c 2004-04-21 15:34:02.000000000 +0400
***************
*** 801,807 ****
*keysym = XK_KP_0;
break;
case XK_KP_Delete:
! *keysym = XK_KP_Decimal;
break;
case XK_R4:
*keysym = XK_KP_Equal; /* Type 4 kbd */
--- 801,808 ----
*keysym = XK_KP_0;
break;
case XK_KP_Delete:
! /* *keysym = XK_KP_Decimal; */
! *keysym = XK_KP_Separator;
break;
case XK_R4:
*keysym = XK_KP_Equal; /* Type 4 kbd */
It is strange nobody noticed it before. Anyway, it would be prudent to
commit a fix for dragonfly as this is very old and basic piece of code.
###@###.###
--
======================================================================
Name: ynR10250 Date: 06/16/2004
Suggested fix would work under XAWT with 1.5.0; similar change work for Motif as well.
However, all this doesn't fix every problem related to this single key.
Namely, it doesn't send proper data with NumLock+Shift and just Shift, and even doesn't work
properly in a TextField.
I'm afraid we cannot fix it in Tiger. A partial fix may be posted to dragonfly, and a new bug 5064016
is filed.
###@###.###
======================================================================
The change above doesn't seem like a right fix to me. This mapping
represents a compenstation to the lack of library-provided mapping for
the keys from NumLock-affected planes. Normally, on Solaris, such
mapping does XKeycodeToKeysym, however on Linux we were unable to use
it.
The code in handleKeyEventWithNumLockMask looks bogus to me, and I
think it should be rewritten. Hard-coded mapping should be removed,
since it works only for some keyboards and doesn't respect user
settings. We must find the way to consistently map the key to/from
NumLock plane. The hard-coded plane number(2) should also be removed,
it doesn't work for Linux(on my machine it is plane 1) and it anyway
might not work for other configurations. Committing for Mustang.
###@###.### 2004-06-21
|