diff --git a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java index cf3f1e3d941..1c63ea856b6 100644 --- a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java +++ b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java @@ -257,8 +257,12 @@ public void start () }// start() public void punchCtrlKey( Robot ro, int keyCode ) { ro.keyPress(KeyEvent.VK_CONTROL); - ro.keyPress(keyCode); - ro.keyRelease(keyCode); + try { + ro.keyPress(keyCode); + ro.keyRelease(keyCode); + }catch(IllegalArgumentException iae) { + System.err.println("skip probably invalid keyCode "+keyCode); + } ro.keyRelease(KeyEvent.VK_CONTROL); ro.delay(200); }