We would like to add a JavaFX API to get the state of CAPS LOCK, NUM LOCK, or SCROLL LOCK.
AWT already has an API to do this:
boolean java.awt.ToolKit::getLockingKeyState���(int keyCode)
We need something similar in JavaFX. Among other things, it would allow an application to inform the user that caps lock was enabled for passwords or other usages where the keyboard input might not be echoed. See JDK-8090732.
A similar FX API would be something like:
boolean java.application.Platform::isKeyLocked(KeyCode keyCode)