JDK-8144625 : Expose code and char properties on KeyCode
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-12-03
  • Updated: 2015-12-10
  • Resolved: 2015-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
Description
KeyCode is lacking getCode() and getChar() methods. They should both return an immutable object (int and String, respectively) and the API seems generally convenient. Proposed patch will be attached shortly.
Comments
Changeset: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/951fc4dd5049
10-12-2015

+1 after fixing the other references to the old methods.
09-12-2015

API looks good. Docs look good. Two more places (not wired up to the build) that need to be changed: rt/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/ConferenceScheduleApp.java: event.getCode().impl_getCode(), rt/apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/control/VirtualKeyboardSkin.java: return KeyEvent.impl_keyEvent(getSkinnable(), chars, chars, code.impl_getCode(),
08-12-2015

Patch ready for review
08-12-2015

For full disclosure, Pavel had the following comment about the getCode() method: JDK-8102410
03-12-2015