--- old/src/java.desktop/share/classes/java/awt/Robot.java 2017-11-21 10:24:21.290140900 +0530 +++ new/src/java.desktop/share/classes/java/awt/Robot.java 2017-11-21 10:24:20.339411900 +0530 @@ -377,6 +377,27 @@ afterEvent(); } + /** + * Presses and releases a given unicode key. The key should be released + * using the {@code keyPressUnicode} and {@code keyReleaseUnicode} method. + *

+ * + * @param unicodeKey unicode key to press and release + * @throws IllegalArgumentException if {@code unicodeKey} is not + * a valid unicode key + * @see #keyPressUnicode(int) + * @see #keyReleaseUnicode(int) + */ + public synchronized void keyUnicode(int unicodeKey) { + checkKeycodeArgument(unicodeKey); + + peer.keyPressUnicode(unicodeKey); + afterEvent(); + + peer.keyReleaseUnicode(unicodeKey); + afterEvent(); + } + private void checkKeycodeArgument(int keycode) { // rather than build a big table or switch statement here, we'll // just check that the key isn't VK_UNDEFINED and assume that the