Using javaFx, how to distinguish between return-key and enter-key on the numpad?
This is a near duplicate of Java/AWT/Swing: how to distinguish the pressed enter or return key , but for javaFX.
Unfortunately, in javaFX, there is no KeyEvent.KEY_LOCATION_NUMPAD.
Stringproperties ofKeyEventmight contain some useful information.The
event.getText()resulted in different values for return and numpad enter keys in my tests (openjfx 21.0.2).There is no guarantee that this is platform independent or that field population won't change in the future versions.