RFR: 8341560: Better documentation for KeyCombinations/KeyCodes/KeyEvents

Kevin Rushforth kcr at openjdk.org
Wed Jan 14 19:17:18 UTC 2026


On Wed, 14 Jan 2026 17:36:13 GMT, Martin Fox <mfox at openjdk.org> wrote:

> Updated documentation for various topics related to keyboard handling.
> 
> This documentation deprecates the KP_UP, KP_DOWN, KP_LEFT, and KP_RIGHT key codes. As outlined in JDK-8316307 no platform has ever generated these codes and using them with a Robot will produce inconsistent results.

I left an inline comment about needing a `since=27` parameter for the `Deprecated` annotations.

As an alternative, you could separate out the deprecations into a follow-on PR for 27, in which case this would become a doc-only PR that could be backported to jfx26.

modules/javafx.graphics/src/main/java/javafx/scene/input/KeyCode.java line 625:

> 623:      * @deprecated Use {@link KeyCode#UP} instead.
> 624:      */
> 625:     @Deprecated

Please add a `since` parameter to the `Deprecated` annotations, which is the release in which it is deprecated.  Given where we are in the release, this would be `@Deprecated(since = "27")`, since it is too late for an enhancement with a deprecation to get into 26 (unless it were deemed important enough, which this doesn't seem to be).

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

PR Review: https://git.openjdk.org/jfx/pull/2036#pullrequestreview-3662350209
PR Review Comment: https://git.openjdk.org/jfx/pull/2036#discussion_r2691706806


More information about the openjfx-dev mailing list