diff -r 356e75119d31 -r 45a5c4d812d9 src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java --- a/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java Thu Nov 01 18:13:25 2018 +0530 +++ b/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java Thu Nov 01 13:56:14 2018 -0700 @@ -1,5 +1,3 @@ -// This is a generated file: do not edit! Edit keysym2ucs.h if necessary. - /* * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,6 +23,19 @@ * questions. */ +/* + * This file was originally generated by a tool that embedded much of + * an X11 keysym header file, keysym2ucs.h, turned into a Java program, + * and which also consumed an UnicodeData.txt database file. + * keysym2ucs.h and a genhash.awk script were checked in alongside this + * source file. Maintaining the Java program to match updated versions + * of keysym2ucs.h is too burdensome, since it is rarely, needed and any + * updates will be minimal, so they have been removed and + * this file can now be hand maintained. If it ever becomes necessary + * to re-generate it, then the deleted files can be recovered from + * the history. + */ + package sun.awt.X11; import java.util.Hashtable; import jdk.internal.misc.Unsafe; @@ -33,15 +44,6 @@ public class XKeysym { - public static void main( String[] args ) { - System.out.println( "Cyrillc zhe:"+convertKeysym(0x06d6, 0)); - System.out.println( "Arabic sheen:"+convertKeysym(0x05d4, 0)); - System.out.println( "Latin a breve:"+convertKeysym(0x01e3, 0)); - System.out.println( "Latin f:"+convertKeysym(0x066, 0)); - System.out.println( "Backspace:"+Integer.toHexString(convertKeysym(0xff08, 0))); - System.out.println( "Ctrl+f:"+Integer.toHexString(convertKeysym(0x066, XConstants.ControlMask))); - } - private XKeysym() {} static class Keysym2JavaKeycode { @@ -71,7 +73,7 @@ static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize()); static Keysym2JavaKeycode kanaLock = new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_KANA_LOCK, java.awt.event.KeyEvent.KEY_LOCATION_STANDARD); - private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym"); + private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.key.XKeysym"); public static char convertKeysym( long ks, int state ) { /* First check for Latin-1 characters (1:1 mapping) */