Task

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

Please specify if the window may be externally created.




 
(lib 'plot)
(plot-x-minmax 10) ; set logical dimensions of plotting area
(plot-y-minmax 100)
  → (("x" 0 10) ("y" 0 100))
;; press ESC to see the canvas
;; the mouse position is displayed as , for example,  [ x: 5.6 y : 88.7]
;; 0 <= x <= 10, 0 <= y <= 100
 