When handling any MouseEvent
it is easy to get the mouse coordinates by invoking methods such as event.getSceneX()
(or event.getScreenX()
if that is what we want). Hovewer, I have no idea how to get this information outside the mouse event handling procedure, if there are no mouse events currently?
In my case: after pressing a certain hotkey, I want something to happen relative to the current mouse position. But I am unable to acquire the position information. How should I do it?