A patch for src/solaris/classes/sun/awt/X11/XKeysym.java
Max (Weijun) Wang
Weijun.Wang at Sun.COM
Sat Jan 17 06:35:15 PST 2009
Hi, BSD Hackers
I'm using the bsd-port openjdk to run NetBeans on my MacBook. There's
a problem that when you press Command+X in the editor, besides the
keyboard shortcut being executed, the letter "X" itself goes into the
edited file.
I've coined the following patch and at least NetBeans works fine now.
diff --git a/src/solaris/classes/sun/awt/X11/XKeysym.java b/src/
solaris/classes/sun/awt/X11/XKeysym.java
--- a/src/solaris/classes/sun/awt/X11/XKeysym.java
+++ b/src/solaris/classes/sun/awt/X11/XKeysym.java
@@ -70,7 +70,7 @@
/* First check for Latin-1 characters (1:1 mapping) */
if ((ks >= 0x0020 && ks <= 0x007e) ||
(ks >= 0x00a0 && ks <= 0x00ff)) {
- if( (state & XConstants.ControlMask) != 0 ) {
+ if( (state & XConstants.ControlMask) != 0 || (state &
16) != 0 ) {
if ((ks >= 'A' && ks <= ']') || (ks == '_') ||
(ks >= 'a' && ks <='z')) {
ks &= 0x1F;
I'm neither a BSD nor an X11/awt expert, so I'm completely not sure if
this really fixes the problem or has broken other things.
Thanks
Max
More information about the bsd-port-dev
mailing list