On Wed, 5 Apr 2023 12:51:31 GMT, Jose Pereda <jper...@openjdk.org> wrote:

>> Martin Fox has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Added manual cross-platform keyboard handling test
>
> modules/javafx.graphics/src/main/native-glass/mac/GlassKey.m line 473:
> 
>> 471:     // If the QWERTY key is in the layout sensitive area search the 
>> other keys in that
>> 472:     // area. We may not find a key so returning NO is possible.
>> 473:     for (unsigned short trialKey = 0x00; trialKey <= 0x7E; ++trialKey)
> 
> I see this as a last resource, in case everything else failed so far. But I 
> wonder if this could be slow? 
> Also given that keyCode in sensitive layout is true only for [0x00 - 0x32] 
> and 0x5D, 0x5F, maybe you could improve this?

This call is used by the Robot code and an accessibility feature (namely 
retrieving the `AXMenuItemCmdVirtualKey` property). Robots aren't built for 
speed but I will look into the accessibility side. To make significant gains in 
this code I would have to cache the results.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/425#discussion_r1162051937

Reply via email to