-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
7
-
None
-
x86
-
solaris_nevada
This problem occurs only on Solaris 11 x64/x86. Solaris 11 sparc is not tested. When using java.awt.Robot to generate key event, the key is generated twice. jdk7 and 6ur (6u23, 6u25) have the same behavior. Other platforms don't have the issue.
Steps to follow to reproduce the problem:
Compile and run attached program TestRobot.java
******
import java.awt.event.KeyEvent;
import java.awt.Robot;
import java.awt.AWTException;
public class TestRobot {
public static Robot robot = null;
public static void initRobot() throws AWTException {
if(robot == null) {
robot = new Robot();
robot.setAutoDelay(500);
}
}
public static void main(String args[]) {
try {
initRobot();
} catch (AWTException e) {
e.printStackTrace();
}
robot.delay(2000);
robot.keyPress(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_A);
}
}
******
BUG:
The sequence keyPress-keyRelease should just generate character 'a' once. This works fine on platforms other than Solaris11. But on Solaris 11, 'a' is generated twice.
Because of this behavior, on Solaris 11, the automation testing using java.awt.Robot will be impacted.
Steps to follow to reproduce the problem:
Compile and run attached program TestRobot.java
******
import java.awt.event.KeyEvent;
import java.awt.Robot;
import java.awt.AWTException;
public class TestRobot {
public static Robot robot = null;
public static void initRobot() throws AWTException {
if(robot == null) {
robot = new Robot();
robot.setAutoDelay(500);
}
}
public static void main(String args[]) {
try {
initRobot();
} catch (AWTException e) {
e.printStackTrace();
}
robot.delay(2000);
robot.keyPress(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_A);
}
}
******
BUG:
The sequence keyPress-keyRelease should just generate character 'a' once. This works fine on platforms other than Solaris11. But on Solaris 11, 'a' is generated twice.
Because of this behavior, on Solaris 11, the automation testing using java.awt.Robot will be impacted.
- relates to
-
JDK-4817479 Robot is generating multiple key events against single keystroke on Redhat Linux
-
- Closed
-