RFR: 8024624: [TEST_BUG] [macosx] CTRL+RIGHT(LEFT) doesn't move selection on next cell in JTable on Aqua L&F

DamonGuy duke at openjdk.java.net
Sat Mar 12 01:30:38 UTC 2022


On Sat, 12 Mar 2022 00:07:45 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> What shortcuts are used by the native macOS applications for such navigation? Aqua should align bihaviour to the native app and not other cross platform L&F or windows/linux.

The only shortcuts that allow for non-adjacent cell selection on tables is `COMMAND+LEFT_CLICK`. This requires the use of a mouse on top of keyboard inputs.

Apple Pages has no support at all for these table navigation functions other than `COMMAND+LEFT_CLICK`. Excel has a selection mode that can be toggled on/off using SHIFT+F8. I also tested in macOS's `System Preferences > Keyboard > Text` and `CMD+CLICK` is the only supported way to select non-adjacent cells as well.

The two paths to fixing this issue was either adding the shortcuts and functionality to Aqua L&F tables or to make the test exclude macOS. The benefit of adding the shortcuts to Aqua allows for users to navigate without the need for a mouse or touchpad. The Oracle doc for tables [here](https://docs.oracle.com/javase/tutorial/uiswing/components/table.html) shows that `CTRL+ARROW` is a supported keyboard action as an alternative for `CTRL+CLICK`, and has no mention of excluding macOS or Aqua L&F. 

So, I thought it is appropriate to add the shortcuts to Aqua, but I can make changes if needed.

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

PR: https://git.openjdk.java.net/jdk/pull/7792



More information about the client-libs-dev mailing list