On Tue, 7 Jan 2025 18:20:15 GMT, Pascal <d...@openjdk.org> wrote: >> Andy Goryachev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added html charset > > modules/jfx.incubator.input/src/main/java/jfx/incubator/scene/control/input/KeyBinding.java > line 46: > >> 44: * @since 24 >> 45: */ >> 46: public class KeyBinding > > There's also existing classes like `javafx.scene.input.KeyCodeCombination`, > which have a different API. Will it increase maintenance burden and/or cause > more friction for users to have two different APIs for a very similar > purpose? Are there plans to consolidate these APIs in the future?
Good question! I've decided to create a new class for the incubator for two main reasons: 1. the only way to construct `KeyCombination` is from a `String`, which incurs the penalty of parsing 2. `KeyCombination` does not differentiate key pressed / key released / key typed events While 1) can be easily addressed by adding a Builder, introducing 2) may cause issues with the existing code, since `KeyCombination` is an existing public API. Any suggestions? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1907377236