6627324: Alt Graph doesnot generate any key event when pressing in German locale
Summary: This Unix only problem solved by mapping XK_ISO_Level3_Shift keysym to Java keycode VK_ALT_GRAPH.
Reviewed-by: son
--- a/jdk/src/solaris/classes/sun/awt/X11/XKeysym.java Fri Apr 18 11:38:32 2008 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XKeysym.java Wed Apr 23 14:35:26 2008 +0400
@@ -1,7 +1,7 @@
// This is a generated file: do not edit! Edit keysym2ucs.h if necessary.
/*
- * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1495,6 +1495,7 @@
keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_Multi_key), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_COMPOSE, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_Mode_switch), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_ALT_GRAPH, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
+ keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_ISO_Level3_Shift), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_ALT_GRAPH, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
/* Editing block */
keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_Redo), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_AGAIN, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
--- a/jdk/src/solaris/classes/sun/awt/X11/genhash.awk Fri Apr 18 11:38:32 2008 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/genhash.awk Wed Apr 23 14:35:26 2008 +0400
@@ -1,4 +1,4 @@
-# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -38,8 +38,8 @@
if( $1 != "0x0000" ) {
ndx = toupper($1);
sub(/0X/, "", ndx);
- printf(" keysym2UCSHash.put( (long)%s, (char)%s); // %s --> %s \n",
- $4, $1, $3, unic[ndx]);
+ printf(" keysym2UCSHash.put( (long)%s, (char)%s); // %s -->%s\n",
+ $4, $1, $3, (unic[ndx]=="" ? "" : " " unic[ndx]));
}
}
/tojava/ { sub(/tojava /, ""); sub(/tojava$/, ""); print}
--- a/jdk/src/solaris/classes/sun/awt/X11/keysym2ucs.h Fri Apr 18 11:38:32 2008 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/keysym2ucs.h Wed Apr 23 14:35:26 2008 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,7 @@
*/
tojava /*
-tojava * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+tojava * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
tojava * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
tojava *
tojava * This code is free software; you can redistribute it and/or modify it
@@ -2546,6 +2546,7 @@
tojava
tojava keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_Multi_key), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_COMPOSE, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
tojava keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_Mode_switch), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_ALT_GRAPH, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
+tojava keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_ISO_Level3_Shift), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_ALT_GRAPH, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));
tojava
tojava /* Editing block */
tojava keysym2JavaKeycodeHash.put( Long.valueOf(XKeySymConstants.XK_Redo), new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_AGAIN, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD));