RFR: 8089373: Translation from character to key code is not sufficient [v3]
Andy Goryachev
angorya at openjdk.org
Mon Jul 10 16:44:11 UTC 2023
On Tue, 9 May 2023 17:34:23 GMT, Martin Fox <duke at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/input/KeyEvent.java line 388:
>>
>>> 386: * The hardware key code which is private to the implementation.
>>> 387: */
>>> 388: private int hardwareCode;
>>
>> Does it need to be private? Events are public, and I think it should be possible to make your own events that act exactly like an event created by the system, which would preclude hidden variables.
>
> At this point I don't have a strong opinion on whether this field is private or not. Originally I wanted it to be private because I thought of it as "whatever magic value makes KeyCharacterCombinations work" and was concerned we might want to tweak that over time. That's less of a concern now that I've prototyped the implementation on three different platforms.
>
> This is largely a policy issue that's above my pay grade. This is an intrinsically platform-specific bit of information we would be exposing to developers.
Are we going to create side effects when KeyEvents are synthesized? See, for instance, EmbeddedScene:366 or FXVKSkin:860 (and possibly other places)?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1126#discussion_r1258582546
More information about the openjfx-dev
mailing list