On Mon, 30 Jun 2025 20:47:55 GMT, Martin Fox <m...@openjdk.org> wrote:

>> tests/manual/events/KeyboardTest.java line 815:
>> 
>>> 813:     // OS special-cases this combination and so does JavaFX. In any 
>>> case
>>> 814:     // Shortcut + "+" is a very common shortcut and deserves a test.
>>> 815:     private void testShiftedShortcut(Layout layout, Node focusNode, 
>>> Logging log) {
>> 
>> Question: is it possible to convert this manual test into an automated 
>> headful one?
>
> I could write a weaker system test. The problem sequence is CMD + EQUALS. 
> There are two possible outcomes depending on the keyboard layout; either the 
> EQUALS yields nothing or it generates a PRESSED event that matches against 
> KeyCharacterCombination("=", KeyCode.SHORTCUT_DOWN). It's not quite the same 
> test but it would have caught this bug. I can verify that it would work on 
> all the keyboard layouts that Apple ships with macOS 15.
> 
> I'm less sure if the test would work cross-platform. It should but I don't 
> have a good way of enumerating and testing all the layouts on Windows and 
> Linux.

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?

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

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

Reply via email to