src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java

Print this page
rev 12972 : 8140606: Update library code to use internal Unsafe
Reviewed-by: duke


  10  * particular file as subject to the "Classpath" exception as provided
  11  * by Oracle in the LICENSE file that accompanied this code.
  12  *
  13  * This code is distributed in the hope that it will be useful, but WITHOUT
  14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16  * version 2 for more details (a copy is included in the LICENSE file that
  17  * accompanied this code).
  18  *
  19  * You should have received a copy of the GNU General Public License version
  20  * 2 along with this work; if not, write to the Free Software Foundation,
  21  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  22  *
  23  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  24  * or visit www.oracle.com if you need additional information or have any
  25  * questions.
  26  */
  27 
  28 package sun.awt.X11;
  29 import java.util.Hashtable;
  30 import sun.misc.Unsafe;
  31 
  32 import sun.util.logging.PlatformLogger;
  33 
  34 public class XKeysym {
  35 
  36     public static void main( String args[] ) {
  37        System.out.println( "Cyrillc zhe:"+convertKeysym(0x06d6, 0));
  38        System.out.println( "Arabic sheen:"+convertKeysym(0x05d4, 0));
  39        System.out.println( "Latin a breve:"+convertKeysym(0x01e3, 0));
  40        System.out.println( "Latin f:"+convertKeysym(0x066, 0));
  41        System.out.println( "Backspace:"+Integer.toHexString(convertKeysym(0xff08, 0)));
  42        System.out.println( "Ctrl+f:"+Integer.toHexString(convertKeysym(0x066, XConstants.ControlMask)));
  43     }
  44 
  45     private XKeysym() {}
  46 
  47     static class Keysym2JavaKeycode  {
  48         int jkeycode;
  49         int keyLocation;
  50         int getJavaKeycode() {




  10  * particular file as subject to the "Classpath" exception as provided
  11  * by Oracle in the LICENSE file that accompanied this code.
  12  *
  13  * This code is distributed in the hope that it will be useful, but WITHOUT
  14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16  * version 2 for more details (a copy is included in the LICENSE file that
  17  * accompanied this code).
  18  *
  19  * You should have received a copy of the GNU General Public License version
  20  * 2 along with this work; if not, write to the Free Software Foundation,
  21  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  22  *
  23  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  24  * or visit www.oracle.com if you need additional information or have any
  25  * questions.
  26  */
  27 
  28 package sun.awt.X11;
  29 import java.util.Hashtable;
  30 import jdk.internal.misc.Unsafe;
  31 
  32 import sun.util.logging.PlatformLogger;
  33 
  34 public class XKeysym {
  35 
  36     public static void main( String args[] ) {
  37        System.out.println( "Cyrillc zhe:"+convertKeysym(0x06d6, 0));
  38        System.out.println( "Arabic sheen:"+convertKeysym(0x05d4, 0));
  39        System.out.println( "Latin a breve:"+convertKeysym(0x01e3, 0));
  40        System.out.println( "Latin f:"+convertKeysym(0x066, 0));
  41        System.out.println( "Backspace:"+Integer.toHexString(convertKeysym(0xff08, 0)));
  42        System.out.println( "Ctrl+f:"+Integer.toHexString(convertKeysym(0x066, XConstants.ControlMask)));
  43     }
  44 
  45     private XKeysym() {}
  46 
  47     static class Keysym2JavaKeycode  {
  48         int jkeycode;
  49         int keyLocation;
  50         int getJavaKeycode() {