On Wed, 20 Apr 2022 17:04:09 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:

> Clear the kCGEventFlagMaskSecondaryFn flag if it is set before posting 
> keyboard events to the system queue.

I assumed that whatever keys we set on an event being posted using 
`CGEventPost`, are delivered unchanged to the 'receiving' applications. But I 
did a test, and that doesn't seem to be the case. You're right, Quartz (or some 
other subsystem) does set those flags before delivering the events. Sorry for 
the noise.
Interestingly, extending the fix to NumPad flag (that 'sticks' in the global 
state similarly) doesn't work in the same way - the flag isn't being added 
automatically for arrow keys' KeyUp event by Quartz, but that's out of scope.

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

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

Reply via email to