Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8315701: [macos] Regression: KeyEvent has different keycode on different keyboard layouts #16664

Closed
wants to merge 4 commits into from

Conversation

alisenchung
Copy link
Contributor

@alisenchung alisenchung commented Nov 14, 2023

Updated previous fix (8262945) to work on extendedKeyCodes. Updated AcceleratorTest to use PassFailJFrame instead of Applet


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8315701: [macos] Regression: KeyEvent has different keycode on different keyboard layouts (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16664/head:pull/16664
$ git checkout pull/16664

Update a local copy of the PR:
$ git checkout pull/16664
$ git pull https://git.openjdk.org/jdk.git pull/16664/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16664

View PR using the GUI difftool:
$ git pr show -t 16664

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16664.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 14, 2023

👋 Welcome back achung! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 14, 2023
@openjdk
Copy link

openjdk bot commented Nov 14, 2023

@alisenchung The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Nov 14, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 14, 2023

Webrevs

Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't still make the test pass on macOS Ventura (13.5.2), yet the fix did improve the situation. Previously, fewer keystrokes led to Fired being printed.

The cases 2 and 5 do not work for me. I use a PC layout for Russian on Mac, period in this Russian layout is on "/?" key but pressing Ctrl+(/?) doesn't fires the event. Nor is the event fired when I press Alt+Ю (key with ".>").

The fix has resolved the issue with Ctrl+N: it works with the fix but doesn't without it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to print which particular event fired? It could be useful for debugging.

I'd create a list of Actions with the names and shortcuts (as a KeyStroke and as string for printing) and then print each action name with corresponding shortcut. Or create a list of objects with corresponding data. I didn't think it through.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just updated the test to print the ActionEvent's getActionCommand, so there is information on which key was pressed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aivanov-jdk please review

Copy link
Member

@azuev-java azuev-java left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@openjdk
Copy link

openjdk bot commented Nov 29, 2023

@alisenchung This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8315701: [macos] Regression: KeyEvent has different keycode on different keyboard layouts

Reviewed-by: aivanov, kizune

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 227 new commits pushed to the master branch:

  • 2584bf8: 8210410: Refactor java.util.Currency:i18n shell tests to plain java tests
  • 454b116: 8320942: Only set openjdk-target when cross compiling linux-aarch64
  • eb44baf: 8320937: support latest VS2022 MSC_VER in abstract_vm_version.cpp
  • 62418c6: 8319444: Unhelpful failure output in TestLegalNotices
  • cdd1a6e: 8313816: Accessing jmethodID might lead to spurious crashes
  • b65ccff: 8320877: Shenandoah: Remove ShenandoahUnloadClassesFrequency support
  • b68356b: 8320806: Augment test/langtools/tools/javac/versions/Versions.java for JDK 22 language changes
  • d783aa3: 8320940: Fix typo in java.lang.Double
  • 43c7f6a: 8320907: Shenandoah: Remove ShenandoahSelfFixing flag
  • da7bcfc: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread
  • ... and 217 more: https://git.openjdk.org/jdk/compare/d992033439073d35877a2c0296fbd01ad5cbcb07...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 29, 2023
Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

It fixes the issue where shortcuts didn't work correctly.
I can't make the test pass on macOS but it's a different problem.

@aivanov-jdk
Copy link
Member

I can't make the test pass on macOS but it's a different problem.

I've submitted JDK-8321042: Test java/awt/event/KeyEvent/AcceleratorTest/AcceleratorTest.java fails on macOS.

@alisenchung
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 30, 2023

Going to push as commit a3eb664.
Since your change was applied there have been 245 commits pushed to the master branch:

  • 6aba6aa: 8320347: Emulate vblendvp[sd] on ECore
  • 6938474: 8320916: jdk/jfr/event/gc/stacktrace/TestParallelMarkSweepAllocationPendingStackTrace.java failed with "OutOfMemoryError: GC overhead limit exceeded"
  • da09eab: 8319980: [JVMCI] libgraal should reuse Thread instances as C2 does
  • 33b26f7: 8319123: Implement JEP 461: Stream Gatherers (Preview)
  • 04ad98e: 8315458: Implement JEP 463: Implicitly Declared Classes and Instance Main Method (Second Preview)
  • 03759e8: 8320304: Refactor and simplify monitor deflation functions
  • da7cf25: 8320665: update jdk_core at open/test/jdk/TEST.groups
  • c9d15f7: 8321025: Enable Neoverse N1 optimizations for Neoverse V2
  • 61653a1: 8320830: [AIX] Dont mix os::dll_load() with direct dlclose() calls
  • 8b102ed: 8321063: AArch64: Zero build fails after JDK-8320368
  • ... and 235 more: https://git.openjdk.org/jdk/compare/d992033439073d35877a2c0296fbd01ad5cbcb07...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 30, 2023
@openjdk openjdk bot closed this Nov 30, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 30, 2023
@openjdk
Copy link

openjdk bot commented Nov 30, 2023

@alisenchung Pushed as commit a3eb664.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
4 participants