-
Bug
-
Resolution: Unresolved
-
P4
-
11, 17
-
os_x
After pressing some keys like ↖ (KeyEvent.VK_HOME), ↘ (KeyEvent.VK_END), ⌦ (KeyEvent.VK_DELETE) and releasing them by java.awt.Robot the [fn] looks like pressed but not released.
Here is an example
import java.awt.*;
import java.awt.event.KeyEvent;
public class MacFnReproducer {
public static void main(String[] args) throws AWTException {
final Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_END);
robot.keyRelease(KeyEvent.VK_END);
//robot.keyRelease(KeyEvent.VK_RIGHT);
robot.delay(2500);
robot.keyPress(KeyEvent.VK_C);
robot.keyRelease(KeyEvent.VK_C);
robot.delay(2500);
}
}
During execution of this app on macOS Monterey (e.g. 12.3.1) the Notification Center window appears (on the upper right corner) like the combination [fn]+[c] was pressed. The issue was not observed on BigSur (probably because the shortcut [fn]+[c] does not work there).
Please note if after releasing KeyEvent.VK_END to invoke releasing KeyEvent.VK_RIGHT then [fn] is also released and press-release [c] works as expected i.e. Notification Center does not appear.
The issue was observed with
openjdk version "19-ea" 2022-09-20
OpenJDK Runtime Environment (build 19-ea+20-1369)
OpenJDK 64-Bit Server VM (build 19-ea+20-1369, mixed mode, sharing)
It can be reproduced with 11, 17 as well.
It cannot be reproduced with 8
Here is an example
import java.awt.*;
import java.awt.event.KeyEvent;
public class MacFnReproducer {
public static void main(String[] args) throws AWTException {
final Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_END);
robot.keyRelease(KeyEvent.VK_END);
//robot.keyRelease(KeyEvent.VK_RIGHT);
robot.delay(2500);
robot.keyPress(KeyEvent.VK_C);
robot.keyRelease(KeyEvent.VK_C);
robot.delay(2500);
}
}
During execution of this app on macOS Monterey (e.g. 12.3.1) the Notification Center window appears (on the upper right corner) like the combination [fn]+[c] was pressed. The issue was not observed on BigSur (probably because the shortcut [fn]+[c] does not work there).
Please note if after releasing KeyEvent.VK_END to invoke releasing KeyEvent.VK_RIGHT then [fn] is also released and press-release [c] works as expected i.e. Notification Center does not appear.
The issue was observed with
openjdk version "19-ea" 2022-09-20
OpenJDK Runtime Environment (build 19-ea+20-1369)
OpenJDK 64-Bit Server VM (build 19-ea+20-1369, mixed mode, sharing)
It can be reproduced with 11, 17 as well.
It cannot be reproduced with 8