On Mon, 30 Jun 2025 21:29:49 GMT, Martin Fox <m...@openjdk.org> wrote:

>> I was thinking more in terms of exhaustive checking of all the available 
>> keys (so we won't encounter another scenario when a bug is introduced 
>> similar to #1528, if that is possible).
>> 
>> I know we can't really control the keyboard layout, so perhaps what I am 
>> asking may not be possible since these tests might fail on other layouts.
>> 
>> So let me ask
>> - is the problem limited to cmd+= on the US keyboard?
>> - could we have a different behavior with a different kb layout (German? 
>> French?)
>> - what happens when the user attaches an external USB or bluetooth keyboard?
>
> The issue here is limited to cmd+=  and cmd+period. These receive special 
> treatment by macOS. To counter-act this they also receive special treatment 
> in the Glass code.
> 
> The macOS special handling of cmd+= only applies to certain keyboard layouts 
> (for example, English but not German). But that's not true for Glass, the 
> work-around in glass applies to all layouts.
> 
> I will look into writing up a system test. I think I can put one together 
> that tests more keys and works on all layouts. It would be nice not to rely 
> solely on this manual test.
> 
> External USB or bluetooth keyboards shouldn't make a difference.
> 
> (In case you're curious, Apple wants to make sure you can invoke Cmd + "+" by 
> holding down Cmd and pressing any key that has a "+" symbol printed on it. On 
> a US English layout that means Cmd + "=" should also work. So they send us 
> Cmd + "=" and if that doesn't trigger a shortcut they send us Cmd + "+". 
> Glass tries to ensure that that second event doesn't turn into another 
> KeyEvent. I think this only happens with keys where "+" is Shift + "=" which 
> is why it happens on US English but not German.)

thank you for the detailed explanations!

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1837#discussion_r2176004991

Reply via email to