RFR: 8267374: (macos) Left Option+Up/Down arrow dont traverse to beginning/end of line in textarea [v5]
Phil Race
prr at openjdk.org
Fri Jun 24 17:57:01 UTC 2022
On Fri, 24 Jun 2022 12:15:34 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> 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.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix Right Option Key handling
src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java line 95:
> 93: "alt altgraph LEFT", DefaultEditorKit.previousWordAction,
> 94: "alt altgraph RIGHT", DefaultEditorKit.nextWordAction,
> 95: "alt UP", DefaultEditorKit.beginLineUpAction,
I find it utterly bizarre to say we need "altgraph" when macOS doesn't have altgraph - certainly not on the k/bs on current mac books or imacs.
My take is that the previous fix JDK-8151136 was a mistake and we should have just excluded the test there on macOS.
src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java line 650:
> 648: * upward one line otherwise.
> 649: * @see #getActions
> 650: */
What ? We are adding new public API to solve this ?
Why is that necessary ?
-------------
PR: https://git.openjdk.org/jdk/pull/9230
More information about the client-libs-dev
mailing list