Task

Get the current location of the mouse cursor relative to the active window.

Please specify if the window may be externally created.




use java::awt::MouseInfo:from<java>;
 
given MouseInfo.getPointerInfo.getLocation {
    say .getX, 'x', .getY;
}