-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
8267374: macOS: Option+Up/Down Arrow don't traverse to beginning/end of line in JTextArea #9230
Conversation
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
Webrevs
|
Is it possible that the submitter tested the right option key? I think it stopped working somewhere after jdk8 as described in the JBS. |
Right option key does not work at all...Left option key worked for left-right but not for up-down..this PR addresses that left option key up/down issue.. |
But the right key worked in jdk8, no? |
Right Option Key worked for left-right, not for up-down in jdk8..in fact it stopped working from jdk9-b120 even for left-right it seems.. |
JDK-8151136 regressed Right Option Key working for making test/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java work which only tests for Linux as per manual instruction so no need to test it for mac |
JDK-8151136 was about the handling of the right alt key? It had the instructions for windows and linux, and that fix added the case for macOS. I do not think it should be reverted. Probably the shortcuts should take care about that right-option key. |
But if you take a look now, that test only do the test for linux and all other instructions for other platforms are removed. I couldn't find the JBS issue which did the removal but I guess it was done for a cause. Also, I couldn't find any shortcuts for right-option key...It seems, both left and right option key has same keycode from native NSAlternateKeyMask If you still insist on reverting, I will request to let this PR to tackle only Left Option for now. I will file another issue to take a look at Right Option Key. |
Yes. As per the comments on the bug
Now, our key bindings are all Alt Key based. so either we need to have VK_ALT as used before the fix (which is why I reverted) or somewhat use ALT_GRAPH binding. Do you know how to have "ALT GRAPH" key binding? |
Mailing list message from Alan Snyder on client-libs-dev: What is a ?PC keyboard?? Do you mean a keyboard attached to a machine running Windows?
-------------- next part -------------- |
src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java
Outdated
Show resolved
Hide resolved
src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java
Outdated
Show resolved
Hide resolved
/csr New API here, it seems |
@prrace has indicated that a compatibility and specification (CSR) request is needed for this pull request. @prsadhuk please create a CSR request for issue JDK-8267374 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
Modified and CSR added https://bugs.openjdk.org/browse/JDK-8291468 |
@prsadhuk 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:
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 817 new commits pushed to the
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 |
/integrate |
Going to push as commit 955baa3.
Your commit was automatically rebased without conflicts. |
Unlike in native "Notes" editor where Option+Up/Down traverses to start/end of each line respectively,
Java does not honour these key combination in editor.
Added the key combination support by moving the caret to start/end of line and then doing caret up/down a line depending on if we are pressing UP or DOWN key.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9230/head:pull/9230
$ git checkout pull/9230
Update a local copy of the PR:
$ git checkout pull/9230
$ git pull https://git.openjdk.org/jdk pull/9230/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9230
View PR using the GUI difftool:
$ git pr show -t 9230
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9230.diff