On Thu, 2 Nov 2023 11:43:06 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:

>> vlaaad has updated the pull request incrementally with one additional commit 
>> since the last revision:
>> 
>>   Don't use NSFunctionKeyMask as modifier at all
>
> When a function key is pressed 
> [NSFunctionKeyMask](https://developer.apple.com/documentation/appkit/nsfunctionkeymask)
>  is automatically included by the system.
> Hence it looks not breaking behavior with this change.
> As the warning is quite clear it looks logical to not include the modifier.
> Tested on macOS 12.6.8, warning appears without this change and disappears 
> with this change.
> 
> Can you please check _MenuItemTest.java_  test file and try to add a unit 
> test, at least a mac specific test, which should press a Function key and 
> check that modifiers in the received event contains Function modifier flag.

@arapte I'm not sure it's possible to detect a single `Fn` key press at all on 
a Mac. By default, `Fn` press changes the input source, but even if I go to 
Preferences -> Keyboard and change "Press globe key to" to "Do nothing", 
pressing `Fn` is still not registered in the JavaFX app. As I understand, it's 
only used to affect the behavior of other keys so e.g. `Fn F1` can change 
brightness instead of emitting an `F1` event.

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

PR Comment: https://git.openjdk.org/jfx/pull/1252#issuecomment-1790999969

Reply via email to