RFR: 8311922: [macOS] right-Option key fails to generate release event [v2]
Harshitha Onkar
honkar at openjdk.org
Tue Aug 29 00:35:12 UTC 2023
On Mon, 28 Aug 2023 21:24:45 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> Previously, a new key combination involving the option key was added to Aqua LAF for JTextAreas. In doing so, some code was removed that created this regression. The regression caused the right option key on Mac OS to incorrectly show another KeyPressed event instead of a KeyReleased event when pressing and releasing the key. Additionally, the location of the key was 'standard' instead of 'right'. Adding back the key mask and its following code resolves the issue and doesn't cause any other CI tests to fail.
>>
>> The headful test included displays the key events as they're pressed. After the changes, the test correctly shows the right option key's KeyPressed and KeyReleased events and shows the location as 'right'.
>
> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove duplicate alt key mask. Add value to other mask.
Changes requested by honkar (Committer).
src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m line 294:
> 292: //kCGSFlagsMaskAppleRightAlternateKey,
> 293: 58,
> 294: 61,
Looks like the only change required to make right option key working is adding in the rightKeyCode (61) here. I don't think it is required to revert/ add back changes related to`leftAltKeyPressed`.
-------------
PR Review: https://git.openjdk.org/jdk/pull/15432#pullrequestreview-1599297883
PR Review Comment: https://git.openjdk.org/jdk/pull/15432#discussion_r1308076750
More information about the client-libs-dev
mailing list