RFR: 8361606 : ConsumeNextMnemonicKeyTypedTest.java fails on Windows: character typed with VK_A: a [v3]

Damon Nguyen dnguyen at openjdk.org
Tue Sep 23 18:04:28 UTC 2025


On Mon, 25 Aug 2025 10:43:51 GMT, Anass Baya <abaya at openjdk.org> wrote:

>> **Analysis :**
>> When the problem occurrs, the key press event related to the mnemonic triggers the item selection. However, as we returned to the menu, the subsequent key typed event arrived and was treated as a normal key press instead of being recognized as part of the mnemonic sequence.
>> 
>> **Proposed Fix:**
>> As a fix, we are tagging the next key typed event to be consumed by the Keyboard Focus Manager
>> 
>> 
>>     public void processKeyEvent(Component focusedComponent, KeyEvent e) {
>>         // consume processed event if needed
>>         if (consumeProcessedKeyEvent(e)) { <--- consumed here
>>             return;
>>         }
>> ...
>
> Anass Baya has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add Linux bug ID 8321303

@honkar-jdk I made a comment this way to make this conversation possible in one thread instead of multiple.

You may be right. Both of my macOS devices are on macOS Sequoia 15.6.1 but the device that fails is x64, while the test that passes is on arm64. However, the CI tests I ran with the fix had both macOS hosts passing the test seemingly consistently.

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

PR Review: https://git.openjdk.org/jdk/pull/26790#pullrequestreview-3259089785


More information about the client-libs-dev mailing list