On Fri, 22 Apr 2022 23:26:02 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> I am not sure do we need to discard the possibility to press the shortcuts 
> via the FN key, if the user may press them then why the robot cannot do the 
> same? Looks like the behavior of this key is similar to the capslock which 
> can be toggled on/off and may have a similar issue? If yes then we can press 
> that button in the test twice to set an initial state(similar to how could 
> fix the same issue for the capslock).

Ok, starting from the beginning - there is no possibility to press the Function 
key with Robot, the corresponding key code (OSX_Function - 0x3F) has not mapped 
to any of the keys available to Robot. Function key does not act like a caps 
lock - it acts like a shift. Just like a shift, it can only be fixated by the 
accessibility feature "sticky keys". Once Function key is released the global 
state should be changed in a way as if this key is not active. We do not issue 
key press or key release event for the Function key. The reason of why global 
state is being changed this way when we issue key press/key release sequence or 
a totally unrelated key (OSX_DownArrow - 0x7D) is unknown, it happens in the 
native code outside of our control. All we can do is to eliminate the 
consequences of this action that started to cause problems in Mac OS X 12.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8320

Reply via email to